Skip to content

Commit dc177eb

Browse files
committed
Update snapshots
1 parent 084e817 commit dc177eb

File tree

8 files changed

+13736
-49169
lines changed

8 files changed

+13736
-49169
lines changed

src/parser/__tests__/__snapshots__/allowed-syntax.test.ts.snap

Lines changed: 6956 additions & 18533 deletions
Large diffs are not rendered by default.

src/parser/__tests__/__snapshots__/fullTS.test.ts.snap

Lines changed: 0 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -159,163 +159,3 @@ Node {
159159
"type": "Program",
160160
}
161161
`;
162-
163-
exports[`fullTS parser returns ESTree compliant program 1`] = `
164-
Node {
165-
"body": Array [
166-
Node {
167-
"declarations": Array [
168-
Node {
169-
"definite": false,
170-
"end": 72,
171-
"id": Node {
172-
"decorators": Array [],
173-
"end": 68,
174-
"loc": SourceLocation {
175-
"end": Position {
176-
"column": 29,
177-
"line": 2,
178-
},
179-
"identifierName": "x",
180-
"source": undefined,
181-
"start": Position {
182-
"column": 12,
183-
"line": 2,
184-
},
185-
},
186-
"name": "x",
187-
"optional": false,
188-
"start": 51,
189-
"type": "Identifier",
190-
"typeAnnotation": Node {
191-
"end": 68,
192-
"loc": SourceLocation {
193-
"end": Position {
194-
"column": 29,
195-
"line": 2,
196-
},
197-
"identifierName": undefined,
198-
"source": undefined,
199-
"start": Position {
200-
"column": 13,
201-
"line": 2,
202-
},
203-
},
204-
"start": 52,
205-
"type": "TSTypeAnnotation",
206-
"typeAnnotation": Node {
207-
"end": 68,
208-
"loc": SourceLocation {
209-
"end": Position {
210-
"column": 29,
211-
"line": 2,
212-
},
213-
"identifierName": undefined,
214-
"source": undefined,
215-
"start": Position {
216-
"column": 15,
217-
"line": 2,
218-
},
219-
},
220-
"start": 54,
221-
"type": "TSTypeReference",
222-
"typeName": Node {
223-
"decorators": Array [],
224-
"end": 68,
225-
"loc": SourceLocation {
226-
"end": Position {
227-
"column": 29,
228-
"line": 2,
229-
},
230-
"identifierName": "StringOrNumber",
231-
"source": undefined,
232-
"start": Position {
233-
"column": 15,
234-
"line": 2,
235-
},
236-
},
237-
"name": "StringOrNumber",
238-
"optional": false,
239-
"start": 54,
240-
"type": "Identifier",
241-
"typeAnnotation": undefined,
242-
},
243-
},
244-
},
245-
},
246-
"init": Node {
247-
"end": 72,
248-
"loc": SourceLocation {
249-
"end": Position {
250-
"column": 33,
251-
"line": 2,
252-
},
253-
"identifierName": undefined,
254-
"source": undefined,
255-
"start": Position {
256-
"column": 32,
257-
"line": 2,
258-
},
259-
},
260-
"raw": "1",
261-
"start": 71,
262-
"type": "Literal",
263-
"value": 1,
264-
},
265-
"loc": SourceLocation {
266-
"end": Position {
267-
"column": 33,
268-
"line": 2,
269-
},
270-
"identifierName": undefined,
271-
"source": undefined,
272-
"start": Position {
273-
"column": 12,
274-
"line": 2,
275-
},
276-
},
277-
"start": 51,
278-
"type": "VariableDeclarator",
279-
},
280-
],
281-
"declare": false,
282-
"end": 73,
283-
"kind": "const",
284-
"loc": SourceLocation {
285-
"end": Position {
286-
"column": 34,
287-
"line": 2,
288-
},
289-
"identifierName": undefined,
290-
"source": undefined,
291-
"start": Position {
292-
"column": 6,
293-
"line": 2,
294-
},
295-
},
296-
"start": 45,
297-
"type": "VariableDeclaration",
298-
},
299-
],
300-
"end": 78,
301-
"extra": Object {
302-
"topLevelAwait": false,
303-
},
304-
"interpreter": null,
305-
"loc": SourceLocation {
306-
"end": Position {
307-
"column": 4,
308-
"line": 3,
309-
},
310-
"identifierName": undefined,
311-
"source": undefined,
312-
"start": Position {
313-
"column": 0,
314-
"line": 1,
315-
},
316-
},
317-
"sourceType": "module",
318-
"start": 0,
319-
"type": "Program",
320-
}
321-
`;

src/runner/__tests__/execMethod.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { mockContext } from '../../utils/testing/mocks'
88
import { getChapterName, objectKeys, objectValues } from '../../utils/misc'
99
import { parseError } from '../..'
1010
import * as validator from '../../validator/validator'
11+
import { wrapWithSkipAndOnly } from '../../utils/testing/misc'
1112

1213
vi.spyOn(validator, 'validateAndAnnotate')
1314

@@ -216,8 +217,8 @@ async function caseTester({
216217
}
217218
}
218219

219-
function testCases(desc: string, cases: TestCase[]) {
220-
describe(desc, () =>
220+
const testCases = wrapWithSkipAndOnly('describe', function (desc: string, cases: TestCase[]) {
221+
this(desc, () =>
221222
test.each(
222223
cases.map(({ code, verboseErrors, contextMethod, chapter, variant, ...tc }, i) => {
223224
chapter = chapter ?? Chapter.SOURCE_1
@@ -239,7 +240,7 @@ function testCases(desc: string, cases: TestCase[]) {
239240
})
240241
)('%s', async (_, to) => caseTester(to))
241242
)
242-
}
243+
})
243244

244245
describe('Ensure that the correct runner is used for the given evaluation context and settings', () => {
245246
testCases('Test regular source cases', sourceCases)

0 commit comments

Comments
 (0)