@@ -28,7 +28,7 @@ t.test('TestUserAgent', async t => {
28
28
29
29
app . get ( '/target' , ctx => ctx . render ( { text : 'Hi' } ) ) ;
30
30
31
- for ( const useTap of [ true , false ] ) {
31
+ for ( const useTap of [ false , true ] ) {
32
32
const ua = useTap ? await app . newTestUserAgent ( { tap : t } ) : await app . newTestUserAgent ( ) ;
33
33
34
34
await t . test ( 'Status Assertion test' , async ( ) => {
@@ -96,7 +96,7 @@ t.test('TestUserAgent', async t => {
96
96
97
97
t . same ( results , [
98
98
[ 'ok' , [ true ] , 'GET request for /' ] ,
99
- [ 'equal ' , [ 200 , 200 ] , 'response status is 200' ]
99
+ [ 'strictEqual ' , [ 200 , 200 ] , 'response status is 200' ]
100
100
] ) ;
101
101
} ) ;
102
102
@@ -115,12 +115,12 @@ t.test('TestUserAgent', async t => {
115
115
116
116
t . same ( results , [
117
117
[ 'ok' , [ true ] , 'GET request for /' ] ,
118
- [ 'equal ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'Content-Type: text/plain' ] ,
118
+ [ 'strictEqual ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'Content-Type: text/plain' ] ,
119
119
[ 'match' , [ 'text/plain; charset=utf-8' , / p l a i n / ] , 'Content-Type is similar' ] ,
120
120
[ 'ok' , [ true ] , 'header "Content-Type" exists' ] ,
121
- [ 'notOk ' , [ false ] , 'no "Content-Disposition" header' ] ,
122
- [ 'equal ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'Content-Type: text/plain' ] ,
123
- [ 'not ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'not Content-Type: text/plain' ] ,
121
+ [ 'ok ' , [ true ] , 'no "Content-Disposition" header' ] ,
122
+ [ 'strictEqual ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'Content-Type: text/plain' ] ,
123
+ [ 'notStrictEqual ' , [ 'text/plain; charset=utf-8' , 'text/plain' ] , 'not Content-Type: text/plain' ] ,
124
124
[ 'match' , [ 'text/plain; charset=utf-8' , / p l a i n / ] , 'Content-Type is similar' ]
125
125
] ) ;
126
126
} ) ;
@@ -137,10 +137,10 @@ t.test('TestUserAgent', async t => {
137
137
138
138
t . same ( results , [
139
139
[ 'ok' , [ true ] , 'GET request for /' ] ,
140
- [ 'equal ' , [ 'Hello Mojo!' , 'test' ] , 'body is equal' ] ,
141
- [ 'not ' , [ 'Hello Mojo!' , 'test' ] , 'body is not equal' ] ,
140
+ [ 'strictEqual ' , [ 'Hello Mojo!' , 'test' ] , 'body is equal' ] ,
141
+ [ 'notStrictEqual ' , [ 'Hello Mojo!' , 'test' ] , 'body is not equal' ] ,
142
142
[ 'match' , [ 'Hello Mojo!' , / t h a t / ] , 'body is similar' ] ,
143
- [ 'notMatch ' , [ 'Hello Mojo!' , / w h a t e v e r / ] , 'body is not similar' ]
143
+ [ 'doesNotMatch ' , [ 'Hello Mojo!' , / w h a t e v e r / ] , 'body is not similar' ]
144
144
] ) ;
145
145
} ) ;
146
146
@@ -166,8 +166,8 @@ t.test('TestUserAgent', async t => {
166
166
[ 'ok' , [ false ] , 'no element for selector "div"' ] ,
167
167
[ 'match' , [ 'Two' , / t e s t / ] , 'similar match for selector "div"' ] ,
168
168
[ 'match' , [ '' , / 1 2 3 / ] , 'similar match for selector "nothing"' ] ,
169
- [ 'notMatch ' , [ 'Two' , / t e s t / ] , 'no similar match for selector "div"' ] ,
170
- [ 'notMatch ' , [ '' , / 1 2 3 / ] , 'no similar match for selector "nothing"' ]
169
+ [ 'doesNotMatch ' , [ 'Two' , / t e s t / ] , 'no similar match for selector "div"' ] ,
170
+ [ 'doesNotMatch ' , [ '' , / 1 2 3 / ] , 'no similar match for selector "nothing"' ]
171
171
] ) ;
172
172
173
173
results = [ ] ;
@@ -196,15 +196,15 @@ t.test('TestUserAgent', async t => {
196
196
[ 'ok' , [ true ] , 'has value for JSON Pointer "/a" (JSON)' ] ,
197
197
[ 'ok' , [ false ] , 'has value for JSON Pointer "/d" (JSON)' ] ,
198
198
[
199
- 'same ' ,
199
+ 'deepStrictEqual ' ,
200
200
[
201
201
[ 'b' , 'c' ] ,
202
202
[ 'b' , 'c' ]
203
203
] ,
204
204
'exact match for JSON Pointer "/a" (JSON)'
205
205
] ,
206
- [ 'same ' , [ undefined , 'e' ] , 'exact match for JSON Pointer "/d" (JSON)' ] ,
207
- [ 'same ' , [ { a : [ 'b' , 'c' ] } , { a : [ 'b' , 'c' ] } ] , 'exact match for JSON Pointer "" (JSON)' ]
206
+ [ 'deepStrictEqual ' , [ undefined , 'e' ] , 'exact match for JSON Pointer "/d" (JSON)' ] ,
207
+ [ 'deepStrictEqual ' , [ { a : [ 'b' , 'c' ] } , { a : [ 'b' , 'c' ] } ] , 'exact match for JSON Pointer "" (JSON)' ]
208
208
] ) ;
209
209
} ) ;
210
210
@@ -224,15 +224,15 @@ t.test('TestUserAgent', async t => {
224
224
[ 'ok' , [ true ] , 'has value for JSON Pointer "/a" (YAML)' ] ,
225
225
[ 'ok' , [ false ] , 'has value for JSON Pointer "/d" (YAML)' ] ,
226
226
[
227
- 'same ' ,
227
+ 'deepStrictEqual ' ,
228
228
[
229
229
[ 'b' , 'c' ] ,
230
230
[ 'b' , 'c' ]
231
231
] ,
232
232
'exact match for JSON Pointer "/a" (YAML)'
233
233
] ,
234
- [ 'same ' , [ undefined , 'e' ] , 'exact match for JSON Pointer "/d" (YAML)' ] ,
235
- [ 'same ' , [ { a : [ 'b' , 'c' ] } , { a : [ 'b' , 'c' ] } ] , 'exact match for JSON Pointer "" (YAML)' ]
234
+ [ 'deepStrictEqual ' , [ undefined , 'e' ] , 'exact match for JSON Pointer "/d" (YAML)' ] ,
235
+ [ 'deepStrictEqual ' , [ { a : [ 'b' , 'c' ] } , { a : [ 'b' , 'c' ] } ] , 'exact match for JSON Pointer "" (YAML)' ]
236
236
] ) ;
237
237
} ) ;
238
238
@@ -261,7 +261,7 @@ t.test('TestUserAgent', async t => {
261
261
[ 'ok' , [ true ] , 'send message' ] ,
262
262
[ 'ok' , [ true ] , 'message received' ] ,
263
263
[ 'ok' , [ true ] , 'closed WebSocket' ] ,
264
- [ 'equal ' , [ 1000 , 1000 ] , 'WebSocket closed with status 1000' ]
264
+ [ 'strictEqual ' , [ 1000 , 1000 ] , 'WebSocket closed with status 1000' ]
265
265
] ) ;
266
266
} ) ;
267
267
0 commit comments