@@ -50,26 +50,26 @@ test('match simple method request', () => {
50
50
} ) ;
51
51
52
52
expect ( matched ) . toMatchInlineSnapshot ( `
53
- Array [
54
- Object {
55
- "id": "exp1",
56
- "limit": "unlimited",
57
- "name": "sample1",
58
- "request": Object {
59
- "headers": Object {},
60
- "path": "/todos",
61
- },
62
- "response": Object {
63
- "body": Array [
64
- Object {
65
- "id": 2,
66
- "text": "get request",
67
- },
68
- ],
53
+ Array [
54
+ Object {
55
+ "id": "exp1",
56
+ "limit": "unlimited",
57
+ "name": "sample1",
58
+ "request": Object {
59
+ "headers": Object {},
60
+ "path": "/todos",
61
+ },
62
+ "response": Object {
63
+ "body": Array [
64
+ Object {
65
+ "id": 2,
66
+ "text": "get request",
69
67
},
70
- },
71
- ]
72
- ` ) ;
68
+ ],
69
+ },
70
+ },
71
+ ]
72
+ ` ) ;
73
73
} ) ;
74
74
75
75
test ( 'match regex method request' , ( ) => {
@@ -220,29 +220,29 @@ test('match headers request', () => {
220
220
} ) ;
221
221
222
222
expect ( matched ) . toMatchInlineSnapshot ( `
223
- Array [
224
- Object {
225
- "id": "exp1",
226
- "limit": "unlimited",
227
- "name": "sample1",
228
- "request": Object {
229
- "headers": Object {
230
- "host": "example.com",
231
- },
232
- "method": "GET",
233
- "path": "/todos",
234
- },
235
- "response": Object {
236
- "body": Array [
237
- Object {
238
- "id": 2,
239
- "text": "get request",
240
- },
241
- ],
242
- },
223
+ Array [
224
+ Object {
225
+ "id": "exp1",
226
+ "limit": "unlimited",
227
+ "name": "sample1",
228
+ "request": Object {
229
+ "headers": Object {
230
+ "host": "example.com",
243
231
},
244
- ]
245
- ` ) ;
232
+ "method": "GET",
233
+ "path": "/todos",
234
+ },
235
+ "response": Object {
236
+ "body": Array [
237
+ Object {
238
+ "id": 2,
239
+ "text": "get request",
240
+ },
241
+ ],
242
+ },
243
+ },
244
+ ]
245
+ ` ) ;
246
246
} ) ;
247
247
248
248
test ( 'match json body request' , ( ) => {
@@ -287,26 +287,26 @@ test('match json body request', () => {
287
287
} ) ;
288
288
289
289
expect ( matched ) . toMatchInlineSnapshot ( `
290
- Array [
291
- Object {
292
- "id": "exp2",
293
- "limit": "unlimited",
294
- "name": "sample2",
295
- "request": Object {
296
- "body": Object {
297
- "id": 3,
298
- "text": "new post",
299
- },
300
- "headers": Object {},
301
- "method": "POST",
302
- "path": "/todos",
303
- },
304
- "response": Object {
305
- "body": Array [],
306
- },
290
+ Array [
291
+ Object {
292
+ "id": "exp2",
293
+ "limit": "unlimited",
294
+ "name": "sample2",
295
+ "request": Object {
296
+ "body": Object {
297
+ "id": 3,
298
+ "text": "new post",
307
299
},
308
- ]
309
- ` ) ;
300
+ "headers": Object {},
301
+ "method": "POST",
302
+ "path": "/todos",
303
+ },
304
+ "response": Object {
305
+ "body": Array [],
306
+ },
307
+ },
308
+ ]
309
+ ` ) ;
310
310
} ) ;
311
311
312
312
test ( 'match string body request' , ( ) => {
@@ -348,23 +348,23 @@ test('match string body request', () => {
348
348
} ) ;
349
349
350
350
expect ( matched ) . toMatchInlineSnapshot ( `
351
- Array [
352
- Object {
353
- "id": "exp2",
354
- "limit": "unlimited",
355
- "name": "sample2",
356
- "request": Object {
357
- "body": "[0-9]th todo",
358
- "headers": Object {},
359
- "method": "POST",
360
- "path": "/todos",
361
- },
362
- "response": Object {
363
- "body": Array [],
364
- },
365
- },
366
- ]
367
- ` ) ;
351
+ Array [
352
+ Object {
353
+ "id": "exp2",
354
+ "limit": "unlimited",
355
+ "name": "sample2",
356
+ "request": Object {
357
+ "body": "[0-9]th todo",
358
+ "headers": Object {},
359
+ "method": "POST",
360
+ "path": "/todos",
361
+ },
362
+ "response": Object {
363
+ "body": Array [],
364
+ },
365
+ },
366
+ ]
367
+ ` ) ;
368
368
} ) ;
369
369
370
370
test ( 'mock: add results in error' , ( ) => {
@@ -384,18 +384,18 @@ test('mock: add', () => {
384
384
} ) ;
385
385
expect ( add ) . not . toThrow ( ) ;
386
386
expect ( engine . mocks ) . toMatchInlineSnapshot ( `
387
- Array [
388
- Object {
389
- "id": "new",
390
- "limit": "unlimited",
391
- "name": "base expectation",
392
- "request": Object {
393
- "path": "/hello",
394
- },
395
- "response": Object {},
396
- },
397
- ]
398
- ` ) ;
387
+ Array [
388
+ Object {
389
+ "id": "new",
390
+ "limit": "unlimited",
391
+ "name": "base expectation",
392
+ "request": Object {
393
+ "path": "/hello",
394
+ },
395
+ "response": Object {},
396
+ },
397
+ ]
398
+ ` ) ;
399
399
} ) ;
400
400
401
401
test ( 'mock: remove' , ( ) => {
0 commit comments