svelte-declarative-testing 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ast.json CHANGED
@@ -2,57 +2,57 @@
2
2
  "css": null,
3
3
  "js": [],
4
4
  "start": 0,
5
- "end": 847,
5
+ "end": 822,
6
6
  "type": "Root",
7
7
  "fragment": {
8
8
  "type": "Fragment",
9
9
  "nodes": [
10
10
  {
11
11
  "type": "Text",
12
- "start": 98,
13
- "end": 100,
12
+ "start": 153,
13
+ "end": 155,
14
14
  "raw": "\n\n",
15
15
  "data": "\n\n"
16
16
  },
17
17
  {
18
18
  "type": "Component",
19
- "start": 100,
20
- "end": 846,
19
+ "start": 155,
20
+ "end": 821,
21
21
  "name": "Describe",
22
22
  "name_loc": {
23
23
  "start": {
24
- "line": 5,
24
+ "line": 6,
25
25
  "column": 1,
26
- "character": 101
26
+ "character": 156
27
27
  },
28
28
  "end": {
29
- "line": 5,
29
+ "line": 6,
30
30
  "column": 9,
31
- "character": 109
31
+ "character": 164
32
32
  }
33
33
  },
34
34
  "attributes": [
35
35
  {
36
36
  "type": "Attribute",
37
- "start": 110,
38
- "end": 128,
37
+ "start": 165,
38
+ "end": 183,
39
39
  "name": "label",
40
40
  "name_loc": {
41
41
  "start": {
42
- "line": 5,
42
+ "line": 6,
43
43
  "column": 10,
44
- "character": 110
44
+ "character": 165
45
45
  },
46
46
  "end": {
47
- "line": 5,
47
+ "line": 6,
48
48
  "column": 15,
49
- "character": 115
49
+ "character": 170
50
50
  }
51
51
  },
52
52
  "value": [
53
53
  {
54
- "start": 117,
55
- "end": 127,
54
+ "start": 172,
55
+ "end": 182,
56
56
  "type": "Text",
57
57
  "raw": "Basic test",
58
58
  "data": "Basic test"
@@ -65,115 +65,115 @@
65
65
  "nodes": [
66
66
  {
67
67
  "type": "Text",
68
- "start": 129,
69
- "end": 132,
68
+ "start": 184,
69
+ "end": 187,
70
70
  "raw": "\n ",
71
71
  "data": "\n "
72
72
  },
73
73
  {
74
- "type": "SnippetBlock",
75
- "start": 132,
76
- "end": 834,
77
- "expression": {
78
- "type": "Identifier",
79
- "name": "tests",
80
- "start": 142,
81
- "end": 147,
82
- "loc": {
83
- "start": {
84
- "line": 6,
85
- "column": 12,
86
- "character": 142
87
- },
88
- "end": {
89
- "line": 6,
90
- "column": 17,
91
- "character": 147
92
- }
74
+ "type": "Component",
75
+ "start": 187,
76
+ "end": 440,
77
+ "name": "Test",
78
+ "name_loc": {
79
+ "start": {
80
+ "line": 7,
81
+ "column": 3,
82
+ "character": 188
83
+ },
84
+ "end": {
85
+ "line": 7,
86
+ "column": 7,
87
+ "character": 192
93
88
  }
94
89
  },
95
- "parameters": [],
96
- "body": {
90
+ "attributes": [
91
+ {
92
+ "type": "Attribute",
93
+ "start": 193,
94
+ "end": 226,
95
+ "name": "it",
96
+ "name_loc": {
97
+ "start": {
98
+ "line": 7,
99
+ "column": 8,
100
+ "character": 193
101
+ },
102
+ "end": {
103
+ "line": 7,
104
+ "column": 10,
105
+ "character": 195
106
+ }
107
+ },
108
+ "value": [
109
+ {
110
+ "start": 197,
111
+ "end": 225,
112
+ "type": "Text",
113
+ "raw": "finds the rendered component",
114
+ "data": "finds the rendered component"
115
+ }
116
+ ]
117
+ }
118
+ ],
119
+ "fragment": {
97
120
  "type": "Fragment",
98
121
  "nodes": [
99
122
  {
100
123
  "type": "Text",
101
- "start": 150,
102
- "end": 155,
124
+ "start": 227,
125
+ "end": 232,
103
126
  "raw": "\n ",
104
127
  "data": "\n "
105
128
  },
106
129
  {
107
- "type": "Component",
108
- "start": 155,
109
- "end": 435,
110
- "name": "Test",
111
- "name_loc": {
112
- "start": {
113
- "line": 7,
114
- "column": 5,
115
- "character": 156
116
- },
117
- "end": {
118
- "line": 7,
119
- "column": 9,
120
- "character": 160
121
- }
122
- },
123
- "attributes": [
124
- {
125
- "type": "Attribute",
126
- "start": 161,
127
- "end": 194,
128
- "name": "it",
129
- "name_loc": {
130
- "start": {
131
- "line": 7,
132
- "column": 10,
133
- "character": 161
134
- },
135
- "end": {
136
- "line": 7,
137
- "column": 12,
138
- "character": 163
139
- }
130
+ "type": "SnippetBlock",
131
+ "start": 232,
132
+ "end": 297,
133
+ "expression": {
134
+ "type": "Identifier",
135
+ "name": "mount",
136
+ "start": 242,
137
+ "end": 247,
138
+ "loc": {
139
+ "start": {
140
+ "line": 8,
141
+ "column": 14,
142
+ "character": 242
140
143
  },
141
- "value": [
142
- {
143
- "start": 165,
144
- "end": 193,
145
- "type": "Text",
146
- "raw": "finds the rendered component",
147
- "data": "finds the rendered component"
148
- }
149
- ]
144
+ "end": {
145
+ "line": 8,
146
+ "column": 19,
147
+ "character": 247
148
+ }
150
149
  }
151
- ],
152
- "fragment": {
150
+ },
151
+ "parameters": [],
152
+ "body": {
153
153
  "type": "Fragment",
154
154
  "nodes": [
155
155
  {
156
156
  "type": "Text",
157
- "start": 195,
158
- "end": 202,
157
+ "start": 250,
158
+ "end": 257,
159
159
  "raw": "\n ",
160
160
  "data": "\n "
161
161
  },
162
162
  {
163
163
  "type": "RegularElement",
164
- "start": 202,
165
- "end": 227,
164
+ "start": 257,
165
+ "end": 282,
166
166
  "name": "button",
167
167
  "name_loc": {
168
168
  "start": {
169
- "line": 8,
169
+ "line": 9,
170
170
  "column": 7,
171
- "character": 203
171
+ "character": 258
172
172
  },
173
173
  "end": {
174
- "line": 8,
174
+ "line": 9,
175
175
  "column": 13,
176
- "character": 209
176
+ "character": 264
177
177
  }
178
178
  },
179
179
  "attributes": [],
@@ -182,8 +182,8 @@
182
182
  "nodes": [
183
183
  {
184
184
  "type": "Text",
185
- "start": 210,
186
- "end": 218,
185
+ "start": 265,
186
+ "end": 273,
187
187
  "raw": "Click me",
188
188
  "data": "Click me"
189
189
  }
@@ -192,536 +192,559 @@
192
192
  },
193
193
  {
194
194
  "type": "Text",
195
- "start": 227,
196
- "end": 235,
197
- "raw": "\n\n ",
198
- "data": "\n\n "
195
+ "start": 282,
196
+ "end": 287,
197
+ "raw": "\n ",
198
+ "data": "\n "
199
+ }
200
+ ]
201
+ }
202
+ },
203
+ {
204
+ "type": "Text",
205
+ "start": 297,
206
+ "end": 303,
207
+ "raw": "\n\n ",
208
+ "data": "\n\n "
209
+ },
210
+ {
211
+ "type": "Component",
212
+ "start": 303,
213
+ "end": 430,
214
+ "name": "Check",
215
+ "name_loc": {
216
+ "start": {
217
+ "line": 12,
218
+ "column": 5,
219
+ "character": 304
220
+ },
221
+ "end": {
222
+ "line": 12,
223
+ "column": 10,
224
+ "character": 309
225
+ }
226
+ },
227
+ "attributes": [
228
+ {
229
+ "type": "Attribute",
230
+ "start": 316,
231
+ "end": 423,
232
+ "name": "fn",
233
+ "name_loc": {
234
+ "start": {
235
+ "line": 13,
236
+ "column": 6,
237
+ "character": 316
238
+ },
239
+ "end": {
240
+ "line": 13,
241
+ "column": 8,
242
+ "character": 318
243
+ }
199
244
  },
200
- {
201
- "type": "SnippetBlock",
202
- "start": 235,
245
+ "value": {
246
+ "type": "ExpressionTag",
247
+ "start": 319,
203
248
  "end": 423,
204
249
  "expression": {
205
- "type": "Identifier",
206
- "name": "checks",
207
- "start": 245,
208
- "end": 251,
250
+ "type": "ArrowFunctionExpression",
251
+ "start": 320,
252
+ "end": 422,
209
253
  "loc": {
210
254
  "start": {
211
- "line": 10,
212
- "column": 16,
213
- "character": 245
255
+ "line": 13,
256
+ "column": 10
214
257
  },
215
258
  "end": {
216
- "line": 10,
217
- "column": 22,
218
- "character": 251
259
+ "line": 15,
260
+ "column": 7
219
261
  }
220
- }
221
- },
222
- "parameters": [],
223
- "body": {
224
- "type": "Fragment",
225
- "nodes": [
226
- {
227
- "type": "Text",
228
- "start": 254,
229
- "end": 263,
230
- "raw": "\n ",
231
- "data": "\n "
232
- },
262
+ },
263
+ "id": null,
264
+ "expression": false,
265
+ "generator": false,
266
+ "async": false,
267
+ "params": [
233
268
  {
234
- "type": "Component",
235
- "start": 263,
236
- "end": 406,
237
- "name": "Check",
238
- "name_loc": {
269
+ "type": "ObjectPattern",
270
+ "start": 321,
271
+ "end": 334,
272
+ "loc": {
239
273
  "start": {
240
- "line": 11,
241
- "column": 9,
242
- "character": 264
274
+ "line": 13,
275
+ "column": 11
243
276
  },
244
277
  "end": {
245
- "line": 11,
246
- "column": 14,
247
- "character": 269
278
+ "line": 13,
279
+ "column": 24
248
280
  }
249
281
  },
250
- "attributes": [
282
+ "properties": [
251
283
  {
252
- "type": "Attribute",
253
- "start": 280,
254
- "end": 395,
255
- "name": "fn",
256
- "name_loc": {
284
+ "type": "Property",
285
+ "start": 323,
286
+ "end": 332,
287
+ "loc": {
257
288
  "start": {
258
- "line": 12,
259
- "column": 10,
260
- "character": 280
289
+ "line": 13,
290
+ "column": 13
261
291
  },
262
292
  "end": {
263
- "line": 12,
264
- "column": 12,
265
- "character": 282
293
+ "line": 13,
294
+ "column": 22
266
295
  }
267
296
  },
297
+ "method": false,
298
+ "shorthand": true,
299
+ "computed": false,
300
+ "key": {
301
+ "type": "Identifier",
302
+ "start": 323,
303
+ "end": 332,
304
+ "loc": {
305
+ "start": {
306
+ "line": 13,
307
+ "column": 13
308
+ },
309
+ "end": {
310
+ "line": 13,
311
+ "column": 22
312
+ }
313
+ },
314
+ "name": "getByRole"
315
+ },
268
316
  "value": {
269
- "type": "ExpressionTag",
270
- "start": 283,
271
- "end": 395,
272
- "expression": {
273
- "type": "ArrowFunctionExpression",
274
- "start": 284,
275
- "end": 394,
317
+ "type": "Identifier",
318
+ "start": 323,
319
+ "end": 332,
320
+ "loc": {
321
+ "start": {
322
+ "line": 13,
323
+ "column": 13
324
+ },
325
+ "end": {
326
+ "line": 13,
327
+ "column": 22
328
+ }
329
+ },
330
+ "name": "getByRole"
331
+ },
332
+ "kind": "init"
333
+ }
334
+ ]
335
+ }
336
+ ],
337
+ "body": {
338
+ "type": "BlockStatement",
339
+ "start": 339,
340
+ "end": 422,
341
+ "loc": {
342
+ "start": {
343
+ "line": 13,
344
+ "column": 29
345
+ },
346
+ "end": {
347
+ "line": 15,
348
+ "column": 7
349
+ }
350
+ },
351
+ "body": [
352
+ {
353
+ "type": "ExpressionStatement",
354
+ "start": 349,
355
+ "end": 414,
356
+ "loc": {
357
+ "start": {
358
+ "line": 14,
359
+ "column": 8
360
+ },
361
+ "end": {
362
+ "line": 14,
363
+ "column": 73
364
+ }
365
+ },
366
+ "expression": {
367
+ "type": "CallExpression",
368
+ "start": 349,
369
+ "end": 413,
370
+ "loc": {
371
+ "start": {
372
+ "line": 14,
373
+ "column": 8
374
+ },
375
+ "end": {
376
+ "line": 14,
377
+ "column": 72
378
+ }
379
+ },
380
+ "callee": {
381
+ "type": "MemberExpression",
382
+ "start": 349,
383
+ "end": 407,
384
+ "loc": {
385
+ "start": {
386
+ "line": 14,
387
+ "column": 8
388
+ },
389
+ "end": {
390
+ "line": 14,
391
+ "column": 66
392
+ }
393
+ },
394
+ "object": {
395
+ "type": "MemberExpression",
396
+ "start": 349,
397
+ "end": 402,
276
398
  "loc": {
277
399
  "start": {
278
- "line": 12,
279
- "column": 14
400
+ "line": 14,
401
+ "column": 8
280
402
  },
281
403
  "end": {
282
404
  "line": 14,
283
- "column": 11
405
+ "column": 61
284
406
  }
285
407
  },
286
- "id": null,
287
- "expression": false,
288
- "generator": false,
289
- "async": false,
290
- "params": [
291
- {
292
- "type": "ObjectPattern",
293
- "start": 285,
294
- "end": 298,
295
- "loc": {
296
- "start": {
297
- "line": 12,
298
- "column": 15
299
- },
300
- "end": {
301
- "line": 12,
302
- "column": 28
303
- }
304
- },
305
- "properties": [
306
- {
307
- "type": "Property",
308
- "start": 287,
309
- "end": 296,
310
- "loc": {
311
- "start": {
312
- "line": 12,
313
- "column": 17
314
- },
315
- "end": {
316
- "line": 12,
317
- "column": 26
318
- }
319
- },
320
- "method": false,
321
- "shorthand": true,
322
- "computed": false,
323
- "key": {
324
- "type": "Identifier",
325
- "start": 287,
326
- "end": 296,
327
- "loc": {
328
- "start": {
329
- "line": 12,
330
- "column": 17
331
- },
332
- "end": {
333
- "line": 12,
334
- "column": 26
335
- }
336
- },
337
- "name": "getByRole"
338
- },
339
- "value": {
340
- "type": "Identifier",
341
- "start": 287,
342
- "end": 296,
343
- "loc": {
344
- "start": {
345
- "line": 12,
346
- "column": 17
347
- },
348
- "end": {
349
- "line": 12,
350
- "column": 26
351
- }
352
- },
353
- "name": "getByRole"
354
- },
355
- "kind": "init"
356
- }
357
- ]
358
- }
359
- ],
360
- "body": {
361
- "type": "BlockStatement",
362
- "start": 303,
363
- "end": 394,
408
+ "object": {
409
+ "type": "CallExpression",
410
+ "start": 349,
411
+ "end": 398,
364
412
  "loc": {
365
413
  "start": {
366
- "line": 12,
367
- "column": 33
414
+ "line": 14,
415
+ "column": 8
368
416
  },
369
417
  "end": {
370
418
  "line": 14,
371
- "column": 11
419
+ "column": 57
372
420
  }
373
421
  },
374
- "body": [
422
+ "callee": {
423
+ "type": "Identifier",
424
+ "start": 349,
425
+ "end": 355,
426
+ "loc": {
427
+ "start": {
428
+ "line": 14,
429
+ "column": 8
430
+ },
431
+ "end": {
432
+ "line": 14,
433
+ "column": 14
434
+ }
435
+ },
436
+ "name": "expect"
437
+ },
438
+ "arguments": [
375
439
  {
376
- "type": "ExpressionStatement",
377
- "start": 317,
378
- "end": 382,
440
+ "type": "CallExpression",
441
+ "start": 356,
442
+ "end": 397,
379
443
  "loc": {
380
444
  "start": {
381
- "line": 13,
382
- "column": 12
445
+ "line": 14,
446
+ "column": 15
383
447
  },
384
448
  "end": {
385
- "line": 13,
386
- "column": 77
449
+ "line": 14,
450
+ "column": 56
387
451
  }
388
452
  },
389
- "expression": {
390
- "type": "CallExpression",
391
- "start": 317,
392
- "end": 381,
453
+ "callee": {
454
+ "type": "Identifier",
455
+ "start": 356,
456
+ "end": 365,
393
457
  "loc": {
394
458
  "start": {
395
- "line": 13,
396
- "column": 12
459
+ "line": 14,
460
+ "column": 15
397
461
  },
398
462
  "end": {
399
- "line": 13,
400
- "column": 76
463
+ "line": 14,
464
+ "column": 24
401
465
  }
402
466
  },
403
- "callee": {
404
- "type": "MemberExpression",
405
- "start": 317,
406
- "end": 375,
467
+ "name": "getByRole"
468
+ },
469
+ "arguments": [
470
+ {
471
+ "type": "Literal",
472
+ "start": 366,
473
+ "end": 374,
407
474
  "loc": {
408
475
  "start": {
409
- "line": 13,
410
- "column": 12
476
+ "line": 14,
477
+ "column": 25
411
478
  },
412
479
  "end": {
413
- "line": 13,
414
- "column": 70
480
+ "line": 14,
481
+ "column": 33
415
482
  }
416
483
  },
417
- "object": {
418
- "type": "MemberExpression",
419
- "start": 317,
420
- "end": 370,
421
- "loc": {
422
- "start": {
423
- "line": 13,
424
- "column": 12
425
- },
426
- "end": {
427
- "line": 13,
428
- "column": 65
429
- }
484
+ "value": "button",
485
+ "raw": "'button'"
486
+ },
487
+ {
488
+ "type": "ObjectExpression",
489
+ "start": 376,
490
+ "end": 396,
491
+ "loc": {
492
+ "start": {
493
+ "line": 14,
494
+ "column": 35
430
495
  },
431
- "object": {
432
- "type": "CallExpression",
433
- "start": 317,
434
- "end": 366,
496
+ "end": {
497
+ "line": 14,
498
+ "column": 55
499
+ }
500
+ },
501
+ "properties": [
502
+ {
503
+ "type": "Property",
504
+ "start": 378,
505
+ "end": 394,
435
506
  "loc": {
436
507
  "start": {
437
- "line": 13,
438
- "column": 12
508
+ "line": 14,
509
+ "column": 37
439
510
  },
440
511
  "end": {
441
- "line": 13,
442
- "column": 61
512
+ "line": 14,
513
+ "column": 53
443
514
  }
444
515
  },
445
- "callee": {
516
+ "method": false,
517
+ "shorthand": false,
518
+ "computed": false,
519
+ "key": {
446
520
  "type": "Identifier",
447
- "start": 317,
448
- "end": 323,
521
+ "start": 378,
522
+ "end": 382,
449
523
  "loc": {
450
524
  "start": {
451
- "line": 13,
452
- "column": 12
525
+ "line": 14,
526
+ "column": 37
453
527
  },
454
528
  "end": {
455
- "line": 13,
456
- "column": 18
529
+ "line": 14,
530
+ "column": 41
457
531
  }
458
532
  },
459
- "name": "expect"
533
+ "name": "name"
460
534
  },
461
- "arguments": [
462
- {
463
- "type": "CallExpression",
464
- "start": 324,
465
- "end": 365,
466
- "loc": {
467
- "start": {
468
- "line": 13,
469
- "column": 19
470
- },
471
- "end": {
472
- "line": 13,
473
- "column": 60
474
- }
475
- },
476
- "callee": {
477
- "type": "Identifier",
478
- "start": 324,
479
- "end": 333,
480
- "loc": {
481
- "start": {
482
- "line": 13,
483
- "column": 19
484
- },
485
- "end": {
486
- "line": 13,
487
- "column": 28
488
- }
489
- },
490
- "name": "getByRole"
535
+ "value": {
536
+ "type": "Literal",
537
+ "start": 384,
538
+ "end": 394,
539
+ "loc": {
540
+ "start": {
541
+ "line": 14,
542
+ "column": 43
491
543
  },
492
- "arguments": [
493
- {
494
- "type": "Literal",
495
- "start": 334,
496
- "end": 342,
497
- "loc": {
498
- "start": {
499
- "line": 13,
500
- "column": 29
501
- },
502
- "end": {
503
- "line": 13,
504
- "column": 37
505
- }
506
- },
507
- "value": "button",
508
- "raw": "'button'"
509
- },
510
- {
511
- "type": "ObjectExpression",
512
- "start": 344,
513
- "end": 364,
514
- "loc": {
515
- "start": {
516
- "line": 13,
517
- "column": 39
518
- },
519
- "end": {
520
- "line": 13,
521
- "column": 59
522
- }
523
- },
524
- "properties": [
525
- {
526
- "type": "Property",
527
- "start": 346,
528
- "end": 362,
529
- "loc": {
530
- "start": {
531
- "line": 13,
532
- "column": 41
533
- },
534
- "end": {
535
- "line": 13,
536
- "column": 57
537
- }
538
- },
539
- "method": false,
540
- "shorthand": false,
541
- "computed": false,
542
- "key": {
543
- "type": "Identifier",
544
- "start": 346,
545
- "end": 350,
546
- "loc": {
547
- "start": {
548
- "line": 13,
549
- "column": 41
550
- },
551
- "end": {
552
- "line": 13,
553
- "column": 45
554
- }
555
- },
556
- "name": "name"
557
- },
558
- "value": {
559
- "type": "Literal",
560
- "start": 352,
561
- "end": 362,
562
- "loc": {
563
- "start": {
564
- "line": 13,
565
- "column": 47
566
- },
567
- "end": {
568
- "line": 13,
569
- "column": 57
570
- }
571
- },
572
- "value": "Click me",
573
- "raw": "'Click me'"
574
- },
575
- "kind": "init"
576
- }
577
- ]
578
- }
579
- ],
580
- "optional": false
581
- }
582
- ],
583
- "optional": false
584
- },
585
- "property": {
586
- "type": "Identifier",
587
- "start": 367,
588
- "end": 370,
589
- "loc": {
590
- "start": {
591
- "line": 13,
592
- "column": 62
544
+ "end": {
545
+ "line": 14,
546
+ "column": 53
547
+ }
593
548
  },
594
- "end": {
595
- "line": 13,
596
- "column": 65
597
- }
598
- },
599
- "name": "not"
600
- },
601
- "computed": false,
602
- "optional": false
603
- },
604
- "property": {
605
- "type": "Identifier",
606
- "start": 371,
607
- "end": 375,
608
- "loc": {
609
- "start": {
610
- "line": 13,
611
- "column": 66
549
+ "value": "Click me",
550
+ "raw": "'Click me'"
612
551
  },
613
- "end": {
614
- "line": 13,
615
- "column": 70
616
- }
617
- },
618
- "name": "toBe"
619
- },
620
- "computed": false,
621
- "optional": false
622
- },
623
- "arguments": [
624
- {
625
- "type": "Literal",
626
- "start": 376,
627
- "end": 380,
628
- "loc": {
629
- "start": {
630
- "line": 13,
631
- "column": 71
632
- },
633
- "end": {
634
- "line": 13,
635
- "column": 75
636
- }
637
- },
638
- "value": null,
639
- "raw": "null"
640
- }
641
- ],
642
- "optional": false
643
- }
552
+ "kind": "init"
553
+ }
554
+ ]
555
+ }
556
+ ],
557
+ "optional": false
644
558
  }
645
- ]
646
- }
559
+ ],
560
+ "optional": false
561
+ },
562
+ "property": {
563
+ "type": "Identifier",
564
+ "start": 399,
565
+ "end": 402,
566
+ "loc": {
567
+ "start": {
568
+ "line": 14,
569
+ "column": 58
570
+ },
571
+ "end": {
572
+ "line": 14,
573
+ "column": 61
574
+ }
575
+ },
576
+ "name": "not"
577
+ },
578
+ "computed": false,
579
+ "optional": false
580
+ },
581
+ "property": {
582
+ "type": "Identifier",
583
+ "start": 403,
584
+ "end": 407,
585
+ "loc": {
586
+ "start": {
587
+ "line": 14,
588
+ "column": 62
589
+ },
590
+ "end": {
591
+ "line": 14,
592
+ "column": 66
593
+ }
594
+ },
595
+ "name": "toBe"
596
+ },
597
+ "computed": false,
598
+ "optional": false
599
+ },
600
+ "arguments": [
601
+ {
602
+ "type": "Literal",
603
+ "start": 408,
604
+ "end": 412,
605
+ "loc": {
606
+ "start": {
607
+ "line": 14,
608
+ "column": 67
609
+ },
610
+ "end": {
611
+ "line": 14,
612
+ "column": 71
613
+ }
614
+ },
615
+ "value": null,
616
+ "raw": "null"
647
617
  }
648
- }
618
+ ],
619
+ "optional": false
649
620
  }
650
- ],
651
- "fragment": {
652
- "type": "Fragment",
653
- "nodes": []
654
621
  }
655
- },
656
- {
657
- "type": "Text",
658
- "start": 406,
659
- "end": 413,
660
- "raw": "\n ",
661
- "data": "\n "
662
- }
663
- ]
622
+ ]
623
+ }
664
624
  }
665
- },
666
- {
667
- "type": "Text",
668
- "start": 423,
669
- "end": 428,
670
- "raw": "\n ",
671
- "data": "\n "
672
625
  }
673
- ]
626
+ }
627
+ ],
628
+ "fragment": {
629
+ "type": "Fragment",
630
+ "nodes": []
674
631
  }
675
632
  },
676
633
  {
677
634
  "type": "Text",
678
- "start": 435,
679
- "end": 441,
680
- "raw": "\n\n ",
681
- "data": "\n\n "
635
+ "start": 430,
636
+ "end": 433,
637
+ "raw": "\n ",
638
+ "data": "\n "
639
+ }
640
+ ]
641
+ }
642
+ },
643
+ {
644
+ "type": "Text",
645
+ "start": 440,
646
+ "end": 444,
647
+ "raw": "\n\n ",
648
+ "data": "\n\n "
649
+ },
650
+ {
651
+ "type": "Component",
652
+ "start": 444,
653
+ "end": 809,
654
+ "name": "Describe",
655
+ "name_loc": {
656
+ "start": {
657
+ "line": 19,
658
+ "column": 3,
659
+ "character": 445
660
+ },
661
+ "end": {
662
+ "line": 19,
663
+ "column": 11,
664
+ "character": 453
665
+ }
666
+ },
667
+ "attributes": [
668
+ {
669
+ "type": "Attribute",
670
+ "start": 454,
671
+ "end": 477,
672
+ "name": "label",
673
+ "name_loc": {
674
+ "start": {
675
+ "line": 19,
676
+ "column": 12,
677
+ "character": 454
678
+ },
679
+ "end": {
680
+ "line": 19,
681
+ "column": 17,
682
+ "character": 459
683
+ }
684
+ },
685
+ "value": [
686
+ {
687
+ "start": 461,
688
+ "end": 476,
689
+ "type": "Text",
690
+ "raw": "Nested describe",
691
+ "data": "Nested describe"
692
+ }
693
+ ]
694
+ }
695
+ ],
696
+ "fragment": {
697
+ "type": "Fragment",
698
+ "nodes": [
699
+ {
700
+ "type": "Text",
701
+ "start": 478,
702
+ "end": 483,
703
+ "raw": "\n ",
704
+ "data": "\n "
682
705
  },
683
706
  {
684
707
  "type": "Component",
685
- "start": 441,
686
- "end": 821,
687
- "name": "Describe",
708
+ "start": 483,
709
+ "end": 795,
710
+ "name": "Test",
688
711
  "name_loc": {
689
712
  "start": {
690
- "line": 19,
713
+ "line": 20,
691
714
  "column": 5,
692
- "character": 442
715
+ "character": 484
693
716
  },
694
717
  "end": {
695
- "line": 19,
696
- "column": 13,
697
- "character": 450
718
+ "line": 20,
719
+ "column": 9,
720
+ "character": 488
698
721
  }
699
722
  },
700
723
  "attributes": [
701
724
  {
702
725
  "type": "Attribute",
703
- "start": 451,
704
- "end": 474,
705
- "name": "label",
726
+ "start": 489,
727
+ "end": 505,
728
+ "name": "it",
706
729
  "name_loc": {
707
730
  "start": {
708
- "line": 19,
709
- "column": 14,
710
- "character": 451
731
+ "line": 20,
732
+ "column": 10,
733
+ "character": 489
711
734
  },
712
735
  "end": {
713
- "line": 19,
714
- "column": 19,
715
- "character": 456
736
+ "line": 20,
737
+ "column": 12,
738
+ "character": 491
716
739
  }
717
740
  },
718
741
  "value": [
719
742
  {
720
- "start": 458,
721
- "end": 473,
743
+ "start": 493,
744
+ "end": 504,
722
745
  "type": "Text",
723
- "raw": "Nested describe",
724
- "data": "Nested describe"
746
+ "raw": "also passes",
747
+ "data": "also passes"
725
748
  }
726
749
  ]
727
750
  }
@@ -731,30 +754,30 @@
731
754
  "nodes": [
732
755
  {
733
756
  "type": "Text",
734
- "start": 475,
735
- "end": 482,
757
+ "start": 506,
758
+ "end": 513,
736
759
  "raw": "\n ",
737
760
  "data": "\n "
738
761
  },
739
762
  {
740
763
  "type": "SnippetBlock",
741
- "start": 482,
742
- "end": 805,
764
+ "start": 513,
765
+ "end": 600,
743
766
  "expression": {
744
767
  "type": "Identifier",
745
- "name": "tests",
746
- "start": 492,
747
- "end": 497,
768
+ "name": "mount",
769
+ "start": 523,
770
+ "end": 528,
748
771
  "loc": {
749
772
  "start": {
750
- "line": 20,
773
+ "line": 21,
751
774
  "column": 16,
752
- "character": 492
775
+ "character": 523
753
776
  },
754
777
  "end": {
755
- "line": 20,
778
+ "line": 21,
756
779
  "column": 21,
757
- "character": 497
780
+ "character": 528
758
781
  }
759
782
  }
760
783
  },
@@ -764,55 +787,67 @@
764
787
  "nodes": [
765
788
  {
766
789
  "type": "Text",
767
- "start": 500,
768
- "end": 507,
769
- "raw": "\n ",
770
- "data": "\n "
790
+ "start": 531,
791
+ "end": 540,
792
+ "raw": "\n ",
793
+ "data": "\n "
771
794
  },
772
795
  {
773
- "type": "Component",
774
- "start": 507,
775
- "end": 788,
776
- "name": "Test",
796
+ "type": "RegularElement",
797
+ "start": 540,
798
+ "end": 583,
799
+ "name": "button",
777
800
  "name_loc": {
778
801
  "start": {
779
- "line": 21,
780
- "column": 7,
781
- "character": 508
802
+ "line": 22,
803
+ "column": 9,
804
+ "character": 541
782
805
  },
783
806
  "end": {
784
- "line": 21,
785
- "column": 11,
786
- "character": 512
807
+ "line": 22,
808
+ "column": 15,
809
+ "character": 547
787
810
  }
788
811
  },
789
812
  "attributes": [
790
813
  {
791
814
  "type": "Attribute",
792
- "start": 513,
793
- "end": 529,
794
- "name": "it",
815
+ "start": 548,
816
+ "end": 565,
817
+ "name": "onclick",
795
818
  "name_loc": {
796
819
  "start": {
797
- "line": 21,
798
- "column": 12,
799
- "character": 513
820
+ "line": 22,
821
+ "column": 16,
822
+ "character": 548
800
823
  },
801
824
  "end": {
802
- "line": 21,
803
- "column": 14,
804
- "character": 515
825
+ "line": 22,
826
+ "column": 23,
827
+ "character": 555
805
828
  }
806
829
  },
807
- "value": [
808
- {
809
- "start": 517,
810
- "end": 528,
811
- "type": "Text",
812
- "raw": "also passes",
813
- "data": "also passes"
830
+ "value": {
831
+ "type": "ExpressionTag",
832
+ "start": 556,
833
+ "end": 565,
834
+ "expression": {
835
+ "type": "Identifier",
836
+ "start": 557,
837
+ "end": 564,
838
+ "loc": {
839
+ "start": {
840
+ "line": 22,
841
+ "column": 25
842
+ },
843
+ "end": {
844
+ "line": 22,
845
+ "column": 32
846
+ }
847
+ },
848
+ "name": "handler"
814
849
  }
815
- ]
850
+ }
816
851
  }
817
852
  ],
818
853
  "fragment": {
@@ -820,539 +855,505 @@
820
855
  "nodes": [
821
856
  {
822
857
  "type": "Text",
823
- "start": 530,
824
- "end": 539,
825
- "raw": "\n ",
826
- "data": "\n "
858
+ "start": 566,
859
+ "end": 574,
860
+ "raw": "Click me",
861
+ "data": "Click me"
862
+ }
863
+ ]
864
+ }
865
+ },
866
+ {
867
+ "type": "Text",
868
+ "start": 583,
869
+ "end": 590,
870
+ "raw": "\n ",
871
+ "data": "\n "
872
+ }
873
+ ]
874
+ }
875
+ },
876
+ {
877
+ "type": "Text",
878
+ "start": 600,
879
+ "end": 608,
880
+ "raw": "\n\n ",
881
+ "data": "\n\n "
882
+ },
883
+ {
884
+ "type": "Component",
885
+ "start": 608,
886
+ "end": 783,
887
+ "name": "Check",
888
+ "name_loc": {
889
+ "start": {
890
+ "line": 25,
891
+ "column": 7,
892
+ "character": 609
893
+ },
894
+ "end": {
895
+ "line": 25,
896
+ "column": 12,
897
+ "character": 614
898
+ }
899
+ },
900
+ "attributes": [
901
+ {
902
+ "type": "Attribute",
903
+ "start": 623,
904
+ "end": 774,
905
+ "name": "fn",
906
+ "name_loc": {
907
+ "start": {
908
+ "line": 26,
909
+ "column": 8,
910
+ "character": 623
911
+ },
912
+ "end": {
913
+ "line": 26,
914
+ "column": 10,
915
+ "character": 625
916
+ }
917
+ },
918
+ "value": {
919
+ "type": "ExpressionTag",
920
+ "start": 626,
921
+ "end": 774,
922
+ "expression": {
923
+ "type": "ArrowFunctionExpression",
924
+ "start": 627,
925
+ "end": 773,
926
+ "loc": {
927
+ "start": {
928
+ "line": 26,
929
+ "column": 12
827
930
  },
931
+ "end": {
932
+ "line": 29,
933
+ "column": 9
934
+ }
935
+ },
936
+ "id": null,
937
+ "expression": false,
938
+ "generator": false,
939
+ "async": false,
940
+ "params": [
828
941
  {
829
- "type": "RegularElement",
830
- "start": 539,
831
- "end": 564,
832
- "name": "button",
833
- "name_loc": {
942
+ "type": "ObjectPattern",
943
+ "start": 628,
944
+ "end": 641,
945
+ "loc": {
834
946
  "start": {
835
- "line": 22,
836
- "column": 9,
837
- "character": 540
947
+ "line": 26,
948
+ "column": 13
838
949
  },
839
950
  "end": {
840
- "line": 22,
841
- "column": 15,
842
- "character": 546
951
+ "line": 26,
952
+ "column": 26
843
953
  }
844
954
  },
845
- "attributes": [],
846
- "fragment": {
847
- "type": "Fragment",
848
- "nodes": [
849
- {
850
- "type": "Text",
851
- "start": 547,
852
- "end": 555,
853
- "raw": "Click me",
854
- "data": "Click me"
855
- }
856
- ]
955
+ "properties": [
956
+ {
957
+ "type": "Property",
958
+ "start": 630,
959
+ "end": 639,
960
+ "loc": {
961
+ "start": {
962
+ "line": 26,
963
+ "column": 15
964
+ },
965
+ "end": {
966
+ "line": 26,
967
+ "column": 24
968
+ }
969
+ },
970
+ "method": false,
971
+ "shorthand": true,
972
+ "computed": false,
973
+ "key": {
974
+ "type": "Identifier",
975
+ "start": 630,
976
+ "end": 639,
977
+ "loc": {
978
+ "start": {
979
+ "line": 26,
980
+ "column": 15
981
+ },
982
+ "end": {
983
+ "line": 26,
984
+ "column": 24
985
+ }
986
+ },
987
+ "name": "getByRole"
988
+ },
989
+ "value": {
990
+ "type": "Identifier",
991
+ "start": 630,
992
+ "end": 639,
993
+ "loc": {
994
+ "start": {
995
+ "line": 26,
996
+ "column": 15
997
+ },
998
+ "end": {
999
+ "line": 26,
1000
+ "column": 24
1001
+ }
1002
+ },
1003
+ "name": "getByRole"
1004
+ },
1005
+ "kind": "init"
1006
+ }
1007
+ ]
1008
+ }
1009
+ ],
1010
+ "body": {
1011
+ "type": "BlockStatement",
1012
+ "start": 646,
1013
+ "end": 773,
1014
+ "loc": {
1015
+ "start": {
1016
+ "line": 26,
1017
+ "column": 31
1018
+ },
1019
+ "end": {
1020
+ "line": 29,
1021
+ "column": 9
857
1022
  }
858
1023
  },
859
- {
860
- "type": "Text",
861
- "start": 564,
862
- "end": 574,
863
- "raw": "\n\n ",
864
- "data": "\n\n "
865
- },
866
- {
867
- "type": "SnippetBlock",
868
- "start": 574,
869
- "end": 774,
870
- "expression": {
871
- "type": "Identifier",
872
- "name": "checks",
873
- "start": 584,
874
- "end": 590,
1024
+ "body": [
1025
+ {
1026
+ "type": "ExpressionStatement",
1027
+ "start": 658,
1028
+ "end": 717,
875
1029
  "loc": {
876
1030
  "start": {
877
- "line": 24,
878
- "column": 18,
879
- "character": 584
1031
+ "line": 27,
1032
+ "column": 10
880
1033
  },
881
1034
  "end": {
882
- "line": 24,
883
- "column": 24,
884
- "character": 590
1035
+ "line": 27,
1036
+ "column": 69
885
1037
  }
886
- }
887
- },
888
- "parameters": [],
889
- "body": {
890
- "type": "Fragment",
891
- "nodes": [
892
- {
893
- "type": "Text",
894
- "start": 593,
895
- "end": 604,
896
- "raw": "\n ",
897
- "data": "\n "
1038
+ },
1039
+ "expression": {
1040
+ "type": "CallExpression",
1041
+ "start": 658,
1042
+ "end": 716,
1043
+ "loc": {
1044
+ "start": {
1045
+ "line": 27,
1046
+ "column": 10
1047
+ },
1048
+ "end": {
1049
+ "line": 27,
1050
+ "column": 68
1051
+ }
898
1052
  },
899
- {
900
- "type": "Component",
901
- "start": 604,
902
- "end": 755,
903
- "name": "Check",
904
- "name_loc": {
1053
+ "callee": {
1054
+ "type": "MemberExpression",
1055
+ "start": 658,
1056
+ "end": 673,
1057
+ "loc": {
905
1058
  "start": {
906
- "line": 25,
907
- "column": 11,
908
- "character": 605
1059
+ "line": 27,
1060
+ "column": 10
909
1061
  },
910
1062
  "end": {
911
- "line": 25,
912
- "column": 16,
913
- "character": 610
1063
+ "line": 27,
1064
+ "column": 25
914
1065
  }
915
1066
  },
916
- "attributes": [
917
- {
918
- "type": "Attribute",
919
- "start": 623,
920
- "end": 742,
921
- "name": "fn",
922
- "name_loc": {
1067
+ "object": {
1068
+ "type": "Identifier",
1069
+ "start": 658,
1070
+ "end": 667,
1071
+ "loc": {
1072
+ "start": {
1073
+ "line": 27,
1074
+ "column": 10
1075
+ },
1076
+ "end": {
1077
+ "line": 27,
1078
+ "column": 19
1079
+ }
1080
+ },
1081
+ "name": "fireEvent"
1082
+ },
1083
+ "property": {
1084
+ "type": "Identifier",
1085
+ "start": 668,
1086
+ "end": 673,
1087
+ "loc": {
1088
+ "start": {
1089
+ "line": 27,
1090
+ "column": 20
1091
+ },
1092
+ "end": {
1093
+ "line": 27,
1094
+ "column": 25
1095
+ }
1096
+ },
1097
+ "name": "click"
1098
+ },
1099
+ "computed": false,
1100
+ "optional": false
1101
+ },
1102
+ "arguments": [
1103
+ {
1104
+ "type": "CallExpression",
1105
+ "start": 674,
1106
+ "end": 715,
1107
+ "loc": {
1108
+ "start": {
1109
+ "line": 27,
1110
+ "column": 26
1111
+ },
1112
+ "end": {
1113
+ "line": 27,
1114
+ "column": 67
1115
+ }
1116
+ },
1117
+ "callee": {
1118
+ "type": "Identifier",
1119
+ "start": 674,
1120
+ "end": 683,
1121
+ "loc": {
923
1122
  "start": {
924
- "line": 26,
925
- "column": 12,
926
- "character": 623
1123
+ "line": 27,
1124
+ "column": 26
927
1125
  },
928
1126
  "end": {
929
- "line": 26,
930
- "column": 14,
931
- "character": 625
1127
+ "line": 27,
1128
+ "column": 35
932
1129
  }
933
1130
  },
934
- "value": {
935
- "type": "ExpressionTag",
936
- "start": 626,
937
- "end": 742,
938
- "expression": {
939
- "type": "ArrowFunctionExpression",
940
- "start": 627,
941
- "end": 741,
942
- "loc": {
943
- "start": {
944
- "line": 26,
945
- "column": 16
946
- },
947
- "end": {
948
- "line": 28,
949
- "column": 13
950
- }
1131
+ "name": "getByRole"
1132
+ },
1133
+ "arguments": [
1134
+ {
1135
+ "type": "Literal",
1136
+ "start": 684,
1137
+ "end": 692,
1138
+ "loc": {
1139
+ "start": {
1140
+ "line": 27,
1141
+ "column": 36
1142
+ },
1143
+ "end": {
1144
+ "line": 27,
1145
+ "column": 44
1146
+ }
1147
+ },
1148
+ "value": "button",
1149
+ "raw": "'button'"
1150
+ },
1151
+ {
1152
+ "type": "ObjectExpression",
1153
+ "start": 694,
1154
+ "end": 714,
1155
+ "loc": {
1156
+ "start": {
1157
+ "line": 27,
1158
+ "column": 46
951
1159
  },
952
- "id": null,
953
- "expression": false,
954
- "generator": false,
955
- "async": false,
956
- "params": [
957
- {
958
- "type": "ObjectPattern",
959
- "start": 628,
960
- "end": 641,
1160
+ "end": {
1161
+ "line": 27,
1162
+ "column": 66
1163
+ }
1164
+ },
1165
+ "properties": [
1166
+ {
1167
+ "type": "Property",
1168
+ "start": 696,
1169
+ "end": 712,
1170
+ "loc": {
1171
+ "start": {
1172
+ "line": 27,
1173
+ "column": 48
1174
+ },
1175
+ "end": {
1176
+ "line": 27,
1177
+ "column": 64
1178
+ }
1179
+ },
1180
+ "method": false,
1181
+ "shorthand": false,
1182
+ "computed": false,
1183
+ "key": {
1184
+ "type": "Identifier",
1185
+ "start": 696,
1186
+ "end": 700,
961
1187
  "loc": {
962
1188
  "start": {
963
- "line": 26,
964
- "column": 17
1189
+ "line": 27,
1190
+ "column": 48
965
1191
  },
966
1192
  "end": {
967
- "line": 26,
968
- "column": 30
969
- }
970
- },
971
- "properties": [
972
- {
973
- "type": "Property",
974
- "start": 630,
975
- "end": 639,
976
- "loc": {
977
- "start": {
978
- "line": 26,
979
- "column": 19
980
- },
981
- "end": {
982
- "line": 26,
983
- "column": 28
984
- }
985
- },
986
- "method": false,
987
- "shorthand": true,
988
- "computed": false,
989
- "key": {
990
- "type": "Identifier",
991
- "start": 630,
992
- "end": 639,
993
- "loc": {
994
- "start": {
995
- "line": 26,
996
- "column": 19
997
- },
998
- "end": {
999
- "line": 26,
1000
- "column": 28
1001
- }
1002
- },
1003
- "name": "getByRole"
1004
- },
1005
- "value": {
1006
- "type": "Identifier",
1007
- "start": 630,
1008
- "end": 639,
1009
- "loc": {
1010
- "start": {
1011
- "line": 26,
1012
- "column": 19
1013
- },
1014
- "end": {
1015
- "line": 26,
1016
- "column": 28
1017
- }
1018
- },
1019
- "name": "getByRole"
1020
- },
1021
- "kind": "init"
1193
+ "line": 27,
1194
+ "column": 52
1022
1195
  }
1023
- ]
1024
- }
1025
- ],
1026
- "body": {
1027
- "type": "BlockStatement",
1028
- "start": 646,
1029
- "end": 741,
1030
- "loc": {
1031
- "start": {
1032
- "line": 26,
1033
- "column": 35
1034
1196
  },
1035
- "end": {
1036
- "line": 28,
1037
- "column": 13
1038
- }
1197
+ "name": "name"
1039
1198
  },
1040
- "body": [
1041
- {
1042
- "type": "ExpressionStatement",
1043
- "start": 662,
1044
- "end": 727,
1045
- "loc": {
1046
- "start": {
1047
- "line": 27,
1048
- "column": 14
1049
- },
1050
- "end": {
1051
- "line": 27,
1052
- "column": 79
1053
- }
1199
+ "value": {
1200
+ "type": "Literal",
1201
+ "start": 702,
1202
+ "end": 712,
1203
+ "loc": {
1204
+ "start": {
1205
+ "line": 27,
1206
+ "column": 54
1054
1207
  },
1055
- "expression": {
1056
- "type": "CallExpression",
1057
- "start": 662,
1058
- "end": 726,
1059
- "loc": {
1060
- "start": {
1061
- "line": 27,
1062
- "column": 14
1063
- },
1064
- "end": {
1065
- "line": 27,
1066
- "column": 78
1067
- }
1068
- },
1069
- "callee": {
1070
- "type": "MemberExpression",
1071
- "start": 662,
1072
- "end": 720,
1073
- "loc": {
1074
- "start": {
1075
- "line": 27,
1076
- "column": 14
1077
- },
1078
- "end": {
1079
- "line": 27,
1080
- "column": 72
1081
- }
1082
- },
1083
- "object": {
1084
- "type": "MemberExpression",
1085
- "start": 662,
1086
- "end": 715,
1087
- "loc": {
1088
- "start": {
1089
- "line": 27,
1090
- "column": 14
1091
- },
1092
- "end": {
1093
- "line": 27,
1094
- "column": 67
1095
- }
1096
- },
1097
- "object": {
1098
- "type": "CallExpression",
1099
- "start": 662,
1100
- "end": 711,
1101
- "loc": {
1102
- "start": {
1103
- "line": 27,
1104
- "column": 14
1105
- },
1106
- "end": {
1107
- "line": 27,
1108
- "column": 63
1109
- }
1110
- },
1111
- "callee": {
1112
- "type": "Identifier",
1113
- "start": 662,
1114
- "end": 668,
1115
- "loc": {
1116
- "start": {
1117
- "line": 27,
1118
- "column": 14
1119
- },
1120
- "end": {
1121
- "line": 27,
1122
- "column": 20
1123
- }
1124
- },
1125
- "name": "expect"
1126
- },
1127
- "arguments": [
1128
- {
1129
- "type": "CallExpression",
1130
- "start": 669,
1131
- "end": 710,
1132
- "loc": {
1133
- "start": {
1134
- "line": 27,
1135
- "column": 21
1136
- },
1137
- "end": {
1138
- "line": 27,
1139
- "column": 62
1140
- }
1141
- },
1142
- "callee": {
1143
- "type": "Identifier",
1144
- "start": 669,
1145
- "end": 678,
1146
- "loc": {
1147
- "start": {
1148
- "line": 27,
1149
- "column": 21
1150
- },
1151
- "end": {
1152
- "line": 27,
1153
- "column": 30
1154
- }
1155
- },
1156
- "name": "getByRole"
1157
- },
1158
- "arguments": [
1159
- {
1160
- "type": "Literal",
1161
- "start": 679,
1162
- "end": 687,
1163
- "loc": {
1164
- "start": {
1165
- "line": 27,
1166
- "column": 31
1167
- },
1168
- "end": {
1169
- "line": 27,
1170
- "column": 39
1171
- }
1172
- },
1173
- "value": "button",
1174
- "raw": "'button'"
1175
- },
1176
- {
1177
- "type": "ObjectExpression",
1178
- "start": 689,
1179
- "end": 709,
1180
- "loc": {
1181
- "start": {
1182
- "line": 27,
1183
- "column": 41
1184
- },
1185
- "end": {
1186
- "line": 27,
1187
- "column": 61
1188
- }
1189
- },
1190
- "properties": [
1191
- {
1192
- "type": "Property",
1193
- "start": 691,
1194
- "end": 707,
1195
- "loc": {
1196
- "start": {
1197
- "line": 27,
1198
- "column": 43
1199
- },
1200
- "end": {
1201
- "line": 27,
1202
- "column": 59
1203
- }
1204
- },
1205
- "method": false,
1206
- "shorthand": false,
1207
- "computed": false,
1208
- "key": {
1209
- "type": "Identifier",
1210
- "start": 691,
1211
- "end": 695,
1212
- "loc": {
1213
- "start": {
1214
- "line": 27,
1215
- "column": 43
1216
- },
1217
- "end": {
1218
- "line": 27,
1219
- "column": 47
1220
- }
1221
- },
1222
- "name": "name"
1223
- },
1224
- "value": {
1225
- "type": "Literal",
1226
- "start": 697,
1227
- "end": 707,
1228
- "loc": {
1229
- "start": {
1230
- "line": 27,
1231
- "column": 49
1232
- },
1233
- "end": {
1234
- "line": 27,
1235
- "column": 59
1236
- }
1237
- },
1238
- "value": "Click me",
1239
- "raw": "'Click me'"
1240
- },
1241
- "kind": "init"
1242
- }
1243
- ]
1244
- }
1245
- ],
1246
- "optional": false
1247
- }
1248
- ],
1249
- "optional": false
1250
- },
1251
- "property": {
1252
- "type": "Identifier",
1253
- "start": 712,
1254
- "end": 715,
1255
- "loc": {
1256
- "start": {
1257
- "line": 27,
1258
- "column": 64
1259
- },
1260
- "end": {
1261
- "line": 27,
1262
- "column": 67
1263
- }
1264
- },
1265
- "name": "not"
1266
- },
1267
- "computed": false,
1268
- "optional": false
1269
- },
1270
- "property": {
1271
- "type": "Identifier",
1272
- "start": 716,
1273
- "end": 720,
1274
- "loc": {
1275
- "start": {
1276
- "line": 27,
1277
- "column": 68
1278
- },
1279
- "end": {
1280
- "line": 27,
1281
- "column": 72
1282
- }
1283
- },
1284
- "name": "toBe"
1285
- },
1286
- "computed": false,
1287
- "optional": false
1288
- },
1289
- "arguments": [
1290
- {
1291
- "type": "Literal",
1292
- "start": 721,
1293
- "end": 725,
1294
- "loc": {
1295
- "start": {
1296
- "line": 27,
1297
- "column": 73
1298
- },
1299
- "end": {
1300
- "line": 27,
1301
- "column": 77
1302
- }
1303
- },
1304
- "value": null,
1305
- "raw": "null"
1306
- }
1307
- ],
1308
- "optional": false
1208
+ "end": {
1209
+ "line": 27,
1210
+ "column": 64
1309
1211
  }
1310
- }
1311
- ]
1212
+ },
1213
+ "value": "Click me",
1214
+ "raw": "'Click me'"
1215
+ },
1216
+ "kind": "init"
1312
1217
  }
1313
- }
1218
+ ]
1314
1219
  }
1315
- }
1316
- ],
1317
- "fragment": {
1318
- "type": "Fragment",
1319
- "nodes": []
1220
+ ],
1221
+ "optional": false
1320
1222
  }
1223
+ ],
1224
+ "optional": false
1225
+ }
1226
+ },
1227
+ {
1228
+ "type": "ExpressionStatement",
1229
+ "start": 728,
1230
+ "end": 763,
1231
+ "loc": {
1232
+ "start": {
1233
+ "line": 28,
1234
+ "column": 10
1321
1235
  },
1322
- {
1323
- "type": "Text",
1324
- "start": 755,
1325
- "end": 764,
1326
- "raw": "\n ",
1327
- "data": "\n "
1236
+ "end": {
1237
+ "line": 28,
1238
+ "column": 45
1328
1239
  }
1329
- ]
1240
+ },
1241
+ "expression": {
1242
+ "type": "CallExpression",
1243
+ "start": 728,
1244
+ "end": 762,
1245
+ "loc": {
1246
+ "start": {
1247
+ "line": 28,
1248
+ "column": 10
1249
+ },
1250
+ "end": {
1251
+ "line": 28,
1252
+ "column": 44
1253
+ }
1254
+ },
1255
+ "callee": {
1256
+ "type": "MemberExpression",
1257
+ "start": 728,
1258
+ "end": 760,
1259
+ "loc": {
1260
+ "start": {
1261
+ "line": 28,
1262
+ "column": 10
1263
+ },
1264
+ "end": {
1265
+ "line": 28,
1266
+ "column": 42
1267
+ }
1268
+ },
1269
+ "object": {
1270
+ "type": "CallExpression",
1271
+ "start": 728,
1272
+ "end": 743,
1273
+ "loc": {
1274
+ "start": {
1275
+ "line": 28,
1276
+ "column": 10
1277
+ },
1278
+ "end": {
1279
+ "line": 28,
1280
+ "column": 25
1281
+ }
1282
+ },
1283
+ "callee": {
1284
+ "type": "Identifier",
1285
+ "start": 728,
1286
+ "end": 734,
1287
+ "loc": {
1288
+ "start": {
1289
+ "line": 28,
1290
+ "column": 10
1291
+ },
1292
+ "end": {
1293
+ "line": 28,
1294
+ "column": 16
1295
+ }
1296
+ },
1297
+ "name": "expect"
1298
+ },
1299
+ "arguments": [
1300
+ {
1301
+ "type": "Identifier",
1302
+ "start": 735,
1303
+ "end": 742,
1304
+ "loc": {
1305
+ "start": {
1306
+ "line": 28,
1307
+ "column": 17
1308
+ },
1309
+ "end": {
1310
+ "line": 28,
1311
+ "column": 24
1312
+ }
1313
+ },
1314
+ "name": "handler"
1315
+ }
1316
+ ],
1317
+ "optional": false
1318
+ },
1319
+ "property": {
1320
+ "type": "Identifier",
1321
+ "start": 744,
1322
+ "end": 760,
1323
+ "loc": {
1324
+ "start": {
1325
+ "line": 28,
1326
+ "column": 26
1327
+ },
1328
+ "end": {
1329
+ "line": 28,
1330
+ "column": 42
1331
+ }
1332
+ },
1333
+ "name": "toHaveBeenCalled"
1334
+ },
1335
+ "computed": false,
1336
+ "optional": false
1337
+ },
1338
+ "arguments": [],
1339
+ "optional": false
1340
+ }
1330
1341
  }
1331
- },
1332
- {
1333
- "type": "Text",
1334
- "start": 774,
1335
- "end": 781,
1336
- "raw": "\n ",
1337
- "data": "\n "
1338
- }
1339
- ]
1342
+ ]
1343
+ }
1340
1344
  }
1341
- },
1342
- {
1343
- "type": "Text",
1344
- "start": 788,
1345
- "end": 795,
1346
- "raw": "\n ",
1347
- "data": "\n "
1348
1345
  }
1349
- ]
1346
+ }
1347
+ ],
1348
+ "fragment": {
1349
+ "type": "Fragment",
1350
+ "nodes": []
1350
1351
  }
1351
1352
  },
1352
1353
  {
1353
1354
  "type": "Text",
1354
- "start": 805,
1355
- "end": 810,
1355
+ "start": 783,
1356
+ "end": 788,
1356
1357
  "raw": "\n ",
1357
1358
  "data": "\n "
1358
1359
  }
@@ -1361,8 +1362,8 @@
1361
1362
  },
1362
1363
  {
1363
1364
  "type": "Text",
1364
- "start": 821,
1365
- "end": 824,
1365
+ "start": 795,
1366
+ "end": 798,
1366
1367
  "raw": "\n ",
1367
1368
  "data": "\n "
1368
1369
  }
@@ -1371,8 +1372,8 @@
1371
1372
  },
1372
1373
  {
1373
1374
  "type": "Text",
1374
- "start": 834,
1375
- "end": 835,
1375
+ "start": 809,
1376
+ "end": 810,
1376
1377
  "raw": "\n",
1377
1378
  "data": "\n"
1378
1379
  }
@@ -1386,19 +1387,19 @@
1386
1387
  "instance": {
1387
1388
  "type": "Script",
1388
1389
  "start": 0,
1389
- "end": 98,
1390
+ "end": 153,
1390
1391
  "context": "default",
1391
1392
  "content": {
1392
1393
  "type": "Program",
1393
1394
  "start": 8,
1394
- "end": 89,
1395
+ "end": 144,
1395
1396
  "loc": {
1396
1397
  "start": {
1397
1398
  "line": 1,
1398
1399
  "column": 0
1399
1400
  },
1400
1401
  "end": {
1401
- "line": 3,
1402
+ "line": 4,
1402
1403
  "column": 9
1403
1404
  }
1404
1405
  },
@@ -1406,7 +1407,7 @@
1406
1407
  {
1407
1408
  "type": "ImportDeclaration",
1408
1409
  "start": 11,
1409
- "end": 88,
1410
+ "end": 63,
1410
1411
  "loc": {
1411
1412
  "start": {
1412
1413
  "line": 2,
@@ -1414,14 +1415,14 @@
1414
1415
  },
1415
1416
  "end": {
1416
1417
  "line": 2,
1417
- "column": 79
1418
+ "column": 54
1418
1419
  }
1419
1420
  },
1420
1421
  "specifiers": [
1421
1422
  {
1422
1423
  "type": "ImportSpecifier",
1423
1424
  "start": 20,
1424
- "end": 24,
1425
+ "end": 29,
1425
1426
  "loc": {
1426
1427
  "start": {
1427
1428
  "line": 2,
@@ -1429,13 +1430,13 @@
1429
1430
  },
1430
1431
  "end": {
1431
1432
  "line": 2,
1432
- "column": 15
1433
+ "column": 20
1433
1434
  }
1434
1435
  },
1435
1436
  "imported": {
1436
1437
  "type": "Identifier",
1437
1438
  "start": 20,
1438
- "end": 24,
1439
+ "end": 29,
1439
1440
  "loc": {
1440
1441
  "start": {
1441
1442
  "line": 2,
@@ -1443,15 +1444,15 @@
1443
1444
  },
1444
1445
  "end": {
1445
1446
  "line": 2,
1446
- "column": 15
1447
+ "column": 20
1447
1448
  }
1448
1449
  },
1449
- "name": "Test"
1450
+ "name": "fireEvent"
1450
1451
  },
1451
1452
  "local": {
1452
1453
  "type": "Identifier",
1453
1454
  "start": 20,
1454
- "end": 24,
1455
+ "end": 29,
1455
1456
  "loc": {
1456
1457
  "start": {
1457
1458
  "line": 2,
@@ -1459,6 +1460,88 @@
1459
1460
  },
1460
1461
  "end": {
1461
1462
  "line": 2,
1463
+ "column": 20
1464
+ }
1465
+ },
1466
+ "name": "fireEvent"
1467
+ }
1468
+ }
1469
+ ],
1470
+ "source": {
1471
+ "type": "Literal",
1472
+ "start": 37,
1473
+ "end": 62,
1474
+ "loc": {
1475
+ "start": {
1476
+ "line": 2,
1477
+ "column": 28
1478
+ },
1479
+ "end": {
1480
+ "line": 2,
1481
+ "column": 53
1482
+ }
1483
+ },
1484
+ "value": "@testing-library/svelte",
1485
+ "raw": "'@testing-library/svelte'"
1486
+ },
1487
+ "attributes": []
1488
+ },
1489
+ {
1490
+ "type": "ImportDeclaration",
1491
+ "start": 66,
1492
+ "end": 143,
1493
+ "loc": {
1494
+ "start": {
1495
+ "line": 3,
1496
+ "column": 2
1497
+ },
1498
+ "end": {
1499
+ "line": 3,
1500
+ "column": 79
1501
+ }
1502
+ },
1503
+ "specifiers": [
1504
+ {
1505
+ "type": "ImportSpecifier",
1506
+ "start": 75,
1507
+ "end": 79,
1508
+ "loc": {
1509
+ "start": {
1510
+ "line": 3,
1511
+ "column": 11
1512
+ },
1513
+ "end": {
1514
+ "line": 3,
1515
+ "column": 15
1516
+ }
1517
+ },
1518
+ "imported": {
1519
+ "type": "Identifier",
1520
+ "start": 75,
1521
+ "end": 79,
1522
+ "loc": {
1523
+ "start": {
1524
+ "line": 3,
1525
+ "column": 11
1526
+ },
1527
+ "end": {
1528
+ "line": 3,
1529
+ "column": 15
1530
+ }
1531
+ },
1532
+ "name": "Test"
1533
+ },
1534
+ "local": {
1535
+ "type": "Identifier",
1536
+ "start": 75,
1537
+ "end": 79,
1538
+ "loc": {
1539
+ "start": {
1540
+ "line": 3,
1541
+ "column": 11
1542
+ },
1543
+ "end": {
1544
+ "line": 3,
1462
1545
  "column": 15
1463
1546
  }
1464
1547
  },
@@ -1467,29 +1550,29 @@
1467
1550
  },
1468
1551
  {
1469
1552
  "type": "ImportSpecifier",
1470
- "start": 26,
1471
- "end": 34,
1553
+ "start": 81,
1554
+ "end": 89,
1472
1555
  "loc": {
1473
1556
  "start": {
1474
- "line": 2,
1557
+ "line": 3,
1475
1558
  "column": 17
1476
1559
  },
1477
1560
  "end": {
1478
- "line": 2,
1561
+ "line": 3,
1479
1562
  "column": 25
1480
1563
  }
1481
1564
  },
1482
1565
  "imported": {
1483
1566
  "type": "Identifier",
1484
- "start": 26,
1485
- "end": 34,
1567
+ "start": 81,
1568
+ "end": 89,
1486
1569
  "loc": {
1487
1570
  "start": {
1488
- "line": 2,
1571
+ "line": 3,
1489
1572
  "column": 17
1490
1573
  },
1491
1574
  "end": {
1492
- "line": 2,
1575
+ "line": 3,
1493
1576
  "column": 25
1494
1577
  }
1495
1578
  },
@@ -1497,15 +1580,15 @@
1497
1580
  },
1498
1581
  "local": {
1499
1582
  "type": "Identifier",
1500
- "start": 26,
1501
- "end": 34,
1583
+ "start": 81,
1584
+ "end": 89,
1502
1585
  "loc": {
1503
1586
  "start": {
1504
- "line": 2,
1587
+ "line": 3,
1505
1588
  "column": 17
1506
1589
  },
1507
1590
  "end": {
1508
- "line": 2,
1591
+ "line": 3,
1509
1592
  "column": 25
1510
1593
  }
1511
1594
  },
@@ -1514,29 +1597,29 @@
1514
1597
  },
1515
1598
  {
1516
1599
  "type": "ImportSpecifier",
1517
- "start": 36,
1518
- "end": 41,
1600
+ "start": 91,
1601
+ "end": 96,
1519
1602
  "loc": {
1520
1603
  "start": {
1521
- "line": 2,
1604
+ "line": 3,
1522
1605
  "column": 27
1523
1606
  },
1524
1607
  "end": {
1525
- "line": 2,
1608
+ "line": 3,
1526
1609
  "column": 32
1527
1610
  }
1528
1611
  },
1529
1612
  "imported": {
1530
1613
  "type": "Identifier",
1531
- "start": 36,
1532
- "end": 41,
1614
+ "start": 91,
1615
+ "end": 96,
1533
1616
  "loc": {
1534
1617
  "start": {
1535
- "line": 2,
1618
+ "line": 3,
1536
1619
  "column": 27
1537
1620
  },
1538
1621
  "end": {
1539
- "line": 2,
1622
+ "line": 3,
1540
1623
  "column": 32
1541
1624
  }
1542
1625
  },
@@ -1544,15 +1627,15 @@
1544
1627
  },
1545
1628
  "local": {
1546
1629
  "type": "Identifier",
1547
- "start": 36,
1548
- "end": 41,
1630
+ "start": 91,
1631
+ "end": 96,
1549
1632
  "loc": {
1550
1633
  "start": {
1551
- "line": 2,
1634
+ "line": 3,
1552
1635
  "column": 27
1553
1636
  },
1554
1637
  "end": {
1555
- "line": 2,
1638
+ "line": 3,
1556
1639
  "column": 32
1557
1640
  }
1558
1641
  },
@@ -1562,15 +1645,15 @@
1562
1645
  ],
1563
1646
  "source": {
1564
1647
  "type": "Literal",
1565
- "start": 49,
1566
- "end": 87,
1648
+ "start": 104,
1649
+ "end": 142,
1567
1650
  "loc": {
1568
1651
  "start": {
1569
- "line": 2,
1652
+ "line": 3,
1570
1653
  "column": 40
1571
1654
  },
1572
1655
  "end": {
1573
- "line": 2,
1656
+ "line": 3,
1574
1657
  "column": 78
1575
1658
  }
1576
1659
  },