@@ -11,10 +11,9 @@ describe('globbing', function() {
11
11
testGlob . shouldSucceed (
12
12
'./*.js' ,
13
13
function ( results ) {
14
- expect (
15
- results . stdout ,
14
+ expect ( results . stdout , 'to contain' , '["start",{"total":1}]' ) . and (
16
15
'to contain' ,
17
- '["end ",{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0, '
16
+ '["pass ",{"title":"should find this glob/test" '
18
17
) ;
19
18
} ,
20
19
done
@@ -39,8 +38,11 @@ describe('globbing', function() {
39
38
testGlob . shouldFail (
40
39
'./*-none.js ./*-none-twice.js' ,
41
40
function ( results ) {
42
- expect ( results . stderr , 'to contain' , 'Error: No test files found' ) ;
43
- expect ( results . stderr , 'not to contain' , '*-none' ) ;
41
+ expect (
42
+ results . stderr ,
43
+ 'to contain' ,
44
+ 'Error: No test files found'
45
+ ) . and ( 'not to contain' , '*-none' ) ;
44
46
} ,
45
47
done
46
48
) ;
@@ -50,10 +52,9 @@ describe('globbing', function() {
50
52
testGlob . shouldSucceed (
51
53
'./*.js ./*-none.js' ,
52
54
function ( results ) {
53
- expect (
54
- results . stdout ,
55
+ expect ( results . stdout , 'to contain' , '["start",{"total":1}]' ) . and (
55
56
'to contain' ,
56
- '["end ",{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0, '
57
+ '["pass ",{"title":"should find this glob/test" '
57
58
) ;
58
59
expect (
59
60
results . stderr ,
@@ -71,10 +72,9 @@ describe('globbing', function() {
71
72
testGlob . shouldSucceed (
72
73
'"./*.js"' ,
73
74
function ( results ) {
74
- expect (
75
- results . stdout ,
75
+ expect ( results . stdout , 'to contain' , '["start",{"total":1}]' ) . and (
76
76
'to contain' ,
77
- '["end ",{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0, '
77
+ '["pass ",{"title":"should find this glob/test" '
78
78
) ;
79
79
} ,
80
80
done
@@ -109,10 +109,9 @@ describe('globbing', function() {
109
109
testGlob . shouldSucceed (
110
110
'"./*.js" "./*-none.js"' ,
111
111
function ( results ) {
112
- expect (
113
- results . stdout ,
112
+ expect ( results . stdout , 'to contain' , '["start",{"total":1}]' ) . and (
114
113
'to contain' ,
115
- '["end ",{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0, '
114
+ '["pass ",{"title":"should find this glob/test" '
116
115
) ;
117
116
expect (
118
117
results . stderr ,
@@ -129,11 +128,15 @@ describe('globbing', function() {
129
128
testGlob . shouldSucceed (
130
129
'"./**/*.js"' ,
131
130
function ( results ) {
132
- expect (
133
- results . stdout ,
134
- 'to contain' ,
135
- '["end",{"suites":2,"tests":2,"passes":2,"pending":0,"failures":0,'
136
- ) ;
131
+ expect ( results . stdout , 'to contain' , '["start",{"total":2}]' )
132
+ . and (
133
+ 'to contain' ,
134
+ '["pass",{"title":"should find this glob/test"'
135
+ )
136
+ . and (
137
+ 'to contain' ,
138
+ '["pass",{"title":"should find this glob/nested/test"'
139
+ ) ;
137
140
} ,
138
141
done
139
142
) ;
@@ -157,11 +160,15 @@ describe('globbing', function() {
157
160
testGlob . shouldSucceed (
158
161
'"./**/*.js" "./**/*-none.js"' ,
159
162
function ( results ) {
160
- expect (
161
- results . stdout ,
162
- 'to contain' ,
163
- '["end",{"suites":2,"tests":2,"passes":2,"pending":0,"failures":0,'
164
- ) ;
163
+ expect ( results . stdout , 'to contain' , '["start",{"total":2}]' )
164
+ . and (
165
+ 'to contain' ,
166
+ '["pass",{"title":"should find this glob/test"'
167
+ )
168
+ . and (
169
+ 'to contain' ,
170
+ '["pass",{"title":"should find this glob/nested/test"'
171
+ ) ;
165
172
expect (
166
173
results . stderr ,
167
174
'to contain' ,
@@ -187,13 +194,6 @@ var testGlob = {
187
194
} )
188
195
} ;
189
196
190
- var isFlakeyNode = ( function ( ) {
191
- var version = process . versions . node . split ( '.' ) ;
192
- return (
193
- version [ 0 ] === '0' && version [ 1 ] === '10' && process . platform === 'win32'
194
- ) ;
195
- } ) ( ) ;
196
-
197
197
function execMochaWith ( validate ) {
198
198
return function execMocha ( glob , assertOn , done ) {
199
199
exec (
@@ -206,12 +206,8 @@ function execMochaWith(validate) {
206
206
function ( error , stdout , stderr ) {
207
207
try {
208
208
validate ( error , stderr ) ;
209
- if ( isFlakeyNode && error && stderr === '' ) {
210
- execMocha ( glob , assertOn , done ) ;
211
- } else {
212
- assertOn ( { stdout : stdout , stderr : stderr } ) ;
213
- done ( ) ;
214
- }
209
+ assertOn ( { stdout : stdout , stderr : stderr } ) ;
210
+ done ( ) ;
215
211
} catch ( assertion ) {
216
212
done ( assertion ) ;
217
213
}
0 commit comments