-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.test.elv
More file actions
102 lines (95 loc) · 1.72 KB
/
stats.test.elv
File metadata and controls
102 lines (95 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
use ./outcomes
use ./section
use ./stats
>> 'Stats' {
var passed-test = [
&output="Wiii!"
&outcome=$outcomes:passed
]
var failed-test = [
&output="Wooo!"
&outcome=$outcomes:failed
]
>> 'from empty section' {
stats:from-section $section:empty |
should-be [
&total=0
&passed=0
&failed=0
]
}
>> 'from single passed test' {
stats:from-section [
&test-results=[
&Cip=$passed-test
]
&sub-sections=[&]
] |
should-be [
&total=1
&passed=1
&failed=0
]
}
>> 'from single failed test' {
stats:from-section [
&test-results=[
&Ciop=$failed-test
]
&sub-sections=[&]
] |
should-be [
&total=1
&passed=0
&failed=1
]
}
>> 'from both passed and failed test' {
stats:from-section [
&test-results=[
&Cip=$passed-test
&Ciop=$failed-test
]
&sub-sections=[&]
] |
should-be [
&total=2
&passed=1
&failed=1
]
}
>> 'from multi-level tests' {
stats:from-section [
&test-results=[
&Cip=$passed-test
&Ciop=$failed-test
]
&sub-sections=[
&Alpha=[
&test-results=[
&Yogi=$passed-test
]
&sub-sections=[
&Gamma=[
&test-results=[
&Ranger=$passed-test
]
&sub-sections=[&]
]
]
]
&Beta=[
&test-results=[
&Bubu=$failed-test
]
&sub-sections=[&]
]
]
] |
should-be [
&total=5
&passed=3
&failed=2
]
}
}