Move parser name to end in test title (#18745)
This commit is contained in:
1 parent
b23044ec1b
commit
7ca5d83e45
142 files changed
+9016
-9018
No files matched your search
@@ -24,6 +24,7 @@ async function* checkDirectory(directory) {
|
||||
directory,
|
||||
ok:
|
||||
directory === FORMAT_TEST_DIRECTORY ||
|
||||
files.some((file) => file.name === ".not-test-directory") ||
|
||||
!files.some(
|
||||
(file) => file.isFile() && file.name !== TEST_SCRIPT_FILE_NAME,
|
||||
) ||
|
||||
@@ -44,13 +45,12 @@ for await (const { directory, ok } of checkDirectory(FORMAT_TEST_DIRECTORY)) {
|
||||
const name = path.relative(PROJECT_ROOT, directory).replaceAll("\\", "/");
|
||||
|
||||
if (!ok) {
|
||||
console.log(name);
|
||||
console.log(` - ${name}`);
|
||||
directories.push(name);
|
||||
}
|
||||
}
|
||||
|
||||
if (directories.length > 0) {
|
||||
console.log();
|
||||
console.error(
|
||||
`${directories.length > 1 ? "Directories" : "Directory"} above missing "${TEST_SCRIPT_FILE_NAME}" file.`,
|
||||
);
|
||||
|
||||
@@ -186,12 +186,11 @@ function runFormatTest(fixtures, parsers, options = {}) {
|
||||
runFormat: () => format(code, formatOptions),
|
||||
};
|
||||
});
|
||||
const shouldSnapshotResult = testCases.some(
|
||||
const testCaseForSnapshot = testCases.find(
|
||||
(testCase) =>
|
||||
!testCase.expectFail && typeof testCase.expectedOutput !== "string",
|
||||
);
|
||||
|
||||
let testCaseForSnapshot;
|
||||
beforeAll(async () => {
|
||||
await Promise.all(
|
||||
testCases.map(async (test) => {
|
||||
@@ -206,16 +205,12 @@ function runFormatTest(fixtures, parsers, options = {}) {
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
testCaseForSnapshot = testCases.find(({ formatResult }) =>
|
||||
Boolean(formatResult),
|
||||
);
|
||||
});
|
||||
|
||||
const hasMultipleParsers = testCases.length > 1;
|
||||
|
||||
for (const testCase of testCases) {
|
||||
const testTitle = `${hasMultipleParsers ? `[${testCase.parser}] ` : ""}format`;
|
||||
const testTitle = `format${testCaseForSnapshot !== testCase && hasMultipleParsers ? `[${testCase.parser}]` : ""}`;
|
||||
|
||||
test(testTitle, async () => {
|
||||
await runTest({
|
||||
@@ -225,34 +220,12 @@ function runFormatTest(fixtures, parsers, options = {}) {
|
||||
result: testCase,
|
||||
testCaseForSnapshot,
|
||||
});
|
||||
|
||||
if (shouldSnapshotResult && !hasMultipleParsers) {
|
||||
snapshotFormatResult(testCaseForSnapshot);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (shouldSnapshotResult && hasMultipleParsers) {
|
||||
test("format", () => {
|
||||
snapshotFormatResult(testCaseForSnapshot);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function snapshotFormatResult(testCase) {
|
||||
expect(testCase).toBeDefined();
|
||||
|
||||
expect(
|
||||
createSnapshot(testCase.formatResult, {
|
||||
parsers: testCase.explicitParsers,
|
||||
formatOptions: testCase.formatOptions,
|
||||
CURSOR_PLACEHOLDER,
|
||||
}),
|
||||
).toMatchSnapshot();
|
||||
}
|
||||
|
||||
async function runTest({
|
||||
filename,
|
||||
code,
|
||||
@@ -271,7 +244,6 @@ async function runTest({
|
||||
}
|
||||
|
||||
expect(formatResult).toBeDefined();
|
||||
expect(testCaseForSnapshot.formatResult).toBeDefined();
|
||||
|
||||
// Make sure output has consistent EOL
|
||||
expect(formatResult.eolVisualizedOutput).toBe(
|
||||
@@ -280,10 +252,23 @@ async function runTest({
|
||||
|
||||
if (typeof result.expectedOutput === "string") {
|
||||
expect(formatResult.eolVisualizedOutput).toBe(visualizeEndOfLine(output));
|
||||
} else if (testCaseForSnapshot !== result) {
|
||||
expect(formatResult.eolVisualizedOutput).toStrictEqual(
|
||||
testCaseForSnapshot.formatResult.eolVisualizedOutput,
|
||||
);
|
||||
} else {
|
||||
expect(testCaseForSnapshot).toBeDefined();
|
||||
expect(testCaseForSnapshot.formatResult).toBeDefined();
|
||||
|
||||
if (testCaseForSnapshot === result) {
|
||||
expect(
|
||||
createSnapshot(testCaseForSnapshot.formatResult, {
|
||||
parsers: testCaseForSnapshot.explicitParsers,
|
||||
formatOptions: testCaseForSnapshot.formatOptions,
|
||||
CURSOR_PLACEHOLDER,
|
||||
}),
|
||||
).toMatchSnapshot();
|
||||
} else {
|
||||
expect(formatResult.eolVisualizedOutput).toStrictEqual(
|
||||
testCaseForSnapshot.formatResult.eolVisualizedOutput,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!FULL_TEST) {
|
||||
|
||||
@@ -26,8 +26,15 @@ const categoryParsers = new Map([
|
||||
"flow",
|
||||
{
|
||||
parsers: ["flow", "babel-flow"],
|
||||
verifyParsers: ["flow", "babel-flow", "typescript", "babel-ts"],
|
||||
extensions: [".js", ".cjs", ".mjs"],
|
||||
verifyParsers: [
|
||||
"flow",
|
||||
"babel-flow",
|
||||
"typescript",
|
||||
"babel-ts",
|
||||
"hermes",
|
||||
"babel",
|
||||
],
|
||||
extensions: [".js", ".cjs", ".mjs", ".unknown"],
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -62,6 +69,7 @@ const categoryParsers = new Map([
|
||||
"typescript",
|
||||
"babel-ts",
|
||||
"hermes",
|
||||
"__babel_estree",
|
||||
],
|
||||
extensions: [".js", ".cjs", ".mjs"],
|
||||
},
|
||||
@@ -115,7 +123,7 @@ const categoryParsers = new Map([
|
||||
{
|
||||
parsers: ["less"],
|
||||
verifyParsers: ["css", "scss"],
|
||||
extensions: [".less"],
|
||||
extensions: [".less", ".unknown"],
|
||||
},
|
||||
],
|
||||
["lwc", { parsers: ["lwc"], verifyParsers: [], extensions: [".html"] }],
|
||||
@@ -129,7 +137,7 @@ const categoryParsers = new Map([
|
||||
{
|
||||
parsers: ["scss"],
|
||||
verifyParsers: ["css", "less"],
|
||||
extensions: [".scss"],
|
||||
extensions: [".scss", ".unknown"],
|
||||
},
|
||||
],
|
||||
[
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`async-arrow-invalid.js [babel] format 1`] = `
|
||||
exports[`async-arrow-invalid.js format[babel] 1`] = `
|
||||
"Unterminated JSX contents. (3:19)
|
||||
1 | // https://github.com/babel/babel/pull/11979
|
||||
2 |
|
||||
@@ -10,7 +10,7 @@ exports[`async-arrow-invalid.js [babel] format 1`] = `
|
||||
Cause: Unterminated JSX contents. (3:18)"
|
||||
`;
|
||||
|
||||
exports[`async-arrow-invalid.js [babel-flow] format 1`] = `
|
||||
exports[`async-arrow-invalid.js format[babel-flow] 1`] = `
|
||||
"Type parameters must come after the async keyword, e.g. instead of \`<T> async () => {}\`, use \`async <T>() => {}\`. (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11979
|
||||
2 |
|
||||
@@ -20,7 +20,7 @@ exports[`async-arrow-invalid.js [babel-flow] format 1`] = `
|
||||
Cause: Type parameters must come after the async keyword, e.g. instead of \`<T> async () => {}\`, use \`async <T>() => {}\`. (3:0)"
|
||||
`;
|
||||
|
||||
exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = `
|
||||
exports[`wrong-arrow-no-parens-jsx.js format[babel] 1`] = `
|
||||
"Unterminated JSX contents. (1:4)
|
||||
> 1 | <T>(a => b);
|
||||
| ^
|
||||
@@ -28,7 +28,7 @@ exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = `
|
||||
Cause: Unterminated JSX contents. (1:3)"
|
||||
`;
|
||||
|
||||
exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = `
|
||||
exports[`wrong-arrow-no-parens-jsx.js format[babel-flow] 1`] = `
|
||||
"Unterminated JSX contents. (1:4)
|
||||
> 1 | <T>(a => b);
|
||||
| ^
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:13)
|
||||
> 1 | interface A mixins B {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`{\` (1:13)
|
||||
> 1 | interface A mixins B {}
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:13)
|
||||
> 1 | interface A implements B {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`{\` (1:13)
|
||||
> 1 | interface A implements B {}
|
||||
| ^^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:21)
|
||||
> 1 | declare interface A mixins B {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`{\` (1:21)
|
||||
> 1 | declare interface A mixins B {}
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:21)
|
||||
> 1 | declare interface A implements B {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`{\` (1:21)
|
||||
> 1 | declare interface A implements B {}
|
||||
| ^^^^^^^^^^"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"\`match\` argument must not be empty (1:7)
|
||||
> 1 | match () {}
|
||||
| ^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"'match' argument must not be empty (1:6)
|
||||
> 1 | match () {}
|
||||
| ^
|
||||
@@ -15,13 +15,13 @@ match () {}
|
||||
^~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"\`match\` argument cannot contain spread elements (1:8)
|
||||
> 1 | match (...b) {}
|
||||
| ^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [hermes] format 1`] = `
|
||||
exports[`snippet: #1 format[hermes] 1`] = `
|
||||
"'match' argument cannot contain spread elements (1:7)
|
||||
> 1 | match (...b) {}
|
||||
| ^
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the token \`;\` (1:24)
|
||||
> 1 | const a = not_a_record {}
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"';' expected (1:23)
|
||||
> 1 | const a = not_a_record {}
|
||||
| ^
|
||||
|
||||
@@ -335,20 +335,6 @@ function foo() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`satisfies.js [hermes] format 1`] = `
|
||||
"';' expected (3:12)
|
||||
1 | // @flow
|
||||
2 |
|
||||
> 3 | const x = y satisfies T;
|
||||
| ^
|
||||
4 |
|
||||
5 | // demonstrating how "satisfies" expression can be practically used as expression statement.
|
||||
6 | const _ = (type: 'foo' | 'bar') => {
|
||||
Cause: ';' expected (3:12)
|
||||
const x = y satisfies T;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`satisfies.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -441,17 +427,18 @@ function satisfiesChain() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`ternary.js [hermes] format 1`] = `
|
||||
"invalid assignment left-hand side (3:0)
|
||||
exports[`satisfies.js format[hermes] 1`] = `
|
||||
"';' expected (3:12)
|
||||
1 | // @flow
|
||||
2 |
|
||||
> 3 | foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
|
||||
4 | ? baaaaaaaaaaaaaaaaaaaaar
|
||||
5 | : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo;
|
||||
6 |
|
||||
Cause: invalid assignment left-hand side (3:0)
|
||||
foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
|
||||
^~~"
|
||||
> 3 | const x = y satisfies T;
|
||||
| ^
|
||||
4 |
|
||||
5 | // demonstrating how "satisfies" expression can be practically used as expression statement.
|
||||
6 | const _ = (type: 'foo' | 'bar') => {
|
||||
Cause: ';' expected (3:12)
|
||||
const x = y satisfies T;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`ternary.js format 1`] = `
|
||||
@@ -559,3 +546,16 @@ bifornCringerMoshedPerplexSawder =
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`ternary.js format[hermes] 1`] = `
|
||||
"invalid assignment left-hand side (3:0)
|
||||
1 | // @flow
|
||||
2 |
|
||||
> 3 | foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
|
||||
4 | ? baaaaaaaaaaaaaaaaaaaaar
|
||||
5 | : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo;
|
||||
6 |
|
||||
Cause: invalid assignment left-hand side (3:0)
|
||||
foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
|
||||
^~~"
|
||||
`;
|
||||
@@ -1,18 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`await-keywords.js [hermes] format 1`] = `
|
||||
"'await' not in an async function (2:6)
|
||||
1 | export class C1 {
|
||||
> 2 | p = await (0);
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
5 | await (0);
|
||||
Cause: 'await' not in an async function (2:6)
|
||||
p = await (0);
|
||||
^~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`await-keywords.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -92,3 +79,16 @@ await(0);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`await-keywords.js format[hermes] 1`] = `
|
||||
"'await' not in an async function (2:6)
|
||||
1 | export class C1 {
|
||||
> 2 | p = await (0);
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
5 | await (0);
|
||||
Cause: 'await' not in an async function (2:6)
|
||||
p = await (0);
|
||||
^~~~~~~~~"
|
||||
`;
|
||||
@@ -1,18 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`const.js [hermes] format 1`] = `
|
||||
"invalid operand in update operation (4:0)
|
||||
2 |
|
||||
3 | // errors: const cannot be reassigned
|
||||
> 4 | x++;
|
||||
5 | x--;
|
||||
6 | x += 0;
|
||||
7 | x -= 0;
|
||||
Cause: invalid operand in update operation (4:0)
|
||||
x++;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`const.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -79,21 +66,17 @@ for (const { baz } of bazzes) {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`rebinding.js [hermes] format 1`] = `
|
||||
"Identifier 'A' is already declared (53:8)
|
||||
51 | function class_class() {
|
||||
52 | class A {}
|
||||
> 53 | class A {} // error: name already bound
|
||||
| ^
|
||||
54 | }
|
||||
55 |
|
||||
56 | function class_let() {
|
||||
Cause: Identifier 'A' is already declared (53:8)
|
||||
class A {} // error: name already bound
|
||||
^
|
||||
note: previous declaration (52:8)
|
||||
class A {}
|
||||
^"
|
||||
exports[`const.js format[hermes] 1`] = `
|
||||
"invalid operand in update operation (4:0)
|
||||
2 |
|
||||
3 | // errors: const cannot be reassigned
|
||||
> 4 | x++;
|
||||
5 | x--;
|
||||
6 | x += 0;
|
||||
7 | x -= 0;
|
||||
Cause: invalid operand in update operation (4:0)
|
||||
x++;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`rebinding.js format 1`] = `
|
||||
@@ -502,21 +485,21 @@ function fn_params_clash_fn_binding(x, y) {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`scope.js [hermes] format 1`] = `
|
||||
"Identifier 'a' is already declared (19:10)
|
||||
17 | break;
|
||||
18 | case "bar":
|
||||
> 19 | let a = ""; // error: a already bound in switch
|
||||
| ^
|
||||
20 | break;
|
||||
21 | }
|
||||
22 | }
|
||||
Cause: Identifier 'a' is already declared (19:10)
|
||||
let a = ""; // error: a already bound in switch
|
||||
^
|
||||
note: previous declaration (15:10)
|
||||
let a = ""; // ok: local to switch
|
||||
^"
|
||||
exports[`rebinding.js format[hermes] 1`] = `
|
||||
"Identifier 'A' is already declared (53:8)
|
||||
51 | function class_class() {
|
||||
52 | class A {}
|
||||
> 53 | class A {} // error: name already bound
|
||||
| ^
|
||||
54 | }
|
||||
55 |
|
||||
56 | function class_let() {
|
||||
Cause: Identifier 'A' is already declared (53:8)
|
||||
class A {} // error: name already bound
|
||||
^
|
||||
note: previous declaration (52:8)
|
||||
class A {}
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`scope.js format 1`] = `
|
||||
@@ -753,6 +736,23 @@ function default_param_2() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`scope.js format[hermes] 1`] = `
|
||||
"Identifier 'a' is already declared (19:10)
|
||||
17 | break;
|
||||
18 | case "bar":
|
||||
> 19 | let a = ""; // error: a already bound in switch
|
||||
| ^
|
||||
20 | break;
|
||||
21 | }
|
||||
22 | }
|
||||
Cause: Identifier 'a' is already declared (19:10)
|
||||
let a = ""; // error: a already bound in switch
|
||||
^
|
||||
note: previous declaration (15:10)
|
||||
let a = ""; // ok: local to switch
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`tdz.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
|
||||
+13
-13
@@ -1,18 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`test.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | /* @flow */
|
||||
2 |
|
||||
> 3 | @decorator4
|
||||
4 | class Foo {
|
||||
5 | @decorator1
|
||||
6 | method1() {}
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@decorator4
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`test.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -46,3 +33,16 @@ class Foo {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | /* @flow */
|
||||
2 |
|
||||
> 3 | @decorator4
|
||||
4 | class Foo {
|
||||
5 | @decorator1
|
||||
6 | method1() {}
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@decorator4
|
||||
^"
|
||||
`;
|
||||
+13
-13
@@ -1,18 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`test.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | /* @flow */
|
||||
2 |
|
||||
> 3 | @decorator4
|
||||
4 | class Foo {
|
||||
5 | @decorator1
|
||||
6 | method1() {}
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@decorator4
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`test.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -46,3 +33,16 @@ class Foo {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | /* @flow */
|
||||
2 |
|
||||
> 3 | @decorator4
|
||||
4 | class Foo {
|
||||
5 | @decorator1
|
||||
6 | method1() {}
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@decorator4
|
||||
^"
|
||||
`;
|
||||
@@ -14,21 +14,6 @@ module.exports = 0;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js [hermes] format 1`] = `
|
||||
"Identifier 'x' is already declared (4:7)
|
||||
2 | (x: string);
|
||||
3 |
|
||||
> 4 | import x from './req';
|
||||
| ^
|
||||
5 |
|
||||
Cause: Identifier 'x' is already declared (4:7)
|
||||
import x from './req';
|
||||
^
|
||||
note: previous declaration (1:4)
|
||||
var x = require('./req');
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`test.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -48,3 +33,18 @@ import x from "./req";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js format[hermes] 1`] = `
|
||||
"Identifier 'x' is already declared (4:7)
|
||||
2 | (x: string);
|
||||
3 |
|
||||
> 4 | import x from './req';
|
||||
| ^
|
||||
5 |
|
||||
Cause: Identifier 'x' is already declared (4:7)
|
||||
import x from './req';
|
||||
^
|
||||
note: previous declaration (1:4)
|
||||
var x = require('./req');
|
||||
^"
|
||||
`;
|
||||
@@ -38,23 +38,6 @@ module.exports = {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bad_shadowing.js [hermes] format 1`] = `
|
||||
"Identifier 'A' is already declared (13:4)
|
||||
11 |
|
||||
12 | // These string types should confict with the imported types
|
||||
> 13 | var A: string = "Hello";
|
||||
| ^
|
||||
14 | var Foo: string = "Goodbye";
|
||||
15 | var Baz: string = "Go away please";
|
||||
16 |
|
||||
Cause: Identifier 'A' is already declared (13:4)
|
||||
var A: string = "Hello";
|
||||
^~~~~~~~~
|
||||
note: previous declaration (5:14)
|
||||
import typeof A from "./A.js";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`bad_shadowing.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -103,18 +86,18 @@ var duck: string = "quack";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`good_shadowing.js [hermes] format 1`] = `
|
||||
"Identifier 'A' is already declared (8:4)
|
||||
6 | import type {Foo, Bar as Baz} from "./A.js";
|
||||
7 |
|
||||
> 8 | var A = require('./A.js');
|
||||
| ^
|
||||
9 | var Foo = A.Foo;
|
||||
10 | var Baz = A.Bar;
|
||||
exports[`bad_shadowing.js format[hermes] 1`] = `
|
||||
"Identifier 'A' is already declared (13:4)
|
||||
11 |
|
||||
Cause: Identifier 'A' is already declared (8:4)
|
||||
var A = require('./A.js');
|
||||
^
|
||||
12 | // These string types should confict with the imported types
|
||||
> 13 | var A: string = "Hello";
|
||||
| ^
|
||||
14 | var Foo: string = "Goodbye";
|
||||
15 | var Baz: string = "Go away please";
|
||||
16 |
|
||||
Cause: Identifier 'A' is already declared (13:4)
|
||||
var A: string = "Hello";
|
||||
^~~~~~~~~
|
||||
note: previous declaration (5:14)
|
||||
import typeof A from "./A.js";
|
||||
^"
|
||||
@@ -172,6 +155,23 @@ var b: Foo = new A.Foo();
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`good_shadowing.js format[hermes] 1`] = `
|
||||
"Identifier 'A' is already declared (8:4)
|
||||
6 | import type {Foo, Bar as Baz} from "./A.js";
|
||||
7 |
|
||||
> 8 | var A = require('./A.js');
|
||||
| ^
|
||||
9 | var Foo = A.Foo;
|
||||
10 | var Baz = A.Bar;
|
||||
11 |
|
||||
Cause: Identifier 'A' is already declared (8:4)
|
||||
var A = require('./A.js');
|
||||
^
|
||||
note: previous declaration (5:14)
|
||||
import typeof A from "./A.js";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import_type.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
|
||||
@@ -50,20 +50,6 @@ function x4(y: string): boolean {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`update.js [hermes] format 1`] = `
|
||||
"invalid operand in update operation (31:4)
|
||||
29 | function() {
|
||||
30 | const y = 123;
|
||||
> 31 | y++; // error, can't update const
|
||||
| ^
|
||||
32 | y--; // error, can't update const
|
||||
33 | },
|
||||
34 |
|
||||
Cause: invalid operand in update operation (31:4)
|
||||
y++; // error, can't update const
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`update.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -151,3 +137,17 @@ let tests = [
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`update.js format[hermes] 1`] = `
|
||||
"invalid operand in update operation (31:4)
|
||||
29 | function() {
|
||||
30 | const y = 123;
|
||||
> 31 | y++; // error, can't update const
|
||||
| ^
|
||||
32 | y--; // error, can't update const
|
||||
33 | },
|
||||
34 |
|
||||
Cause: invalid operand in update operation (31:4)
|
||||
y++; // error, can't update const
|
||||
^"
|
||||
`;
|
||||
@@ -1,40 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`comments.js [babel-ts] format 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {
|
||||
Cause: Unexpected token (3:2)"
|
||||
`;
|
||||
|
||||
exports[`comments.js [oxc-ts] format 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {"
|
||||
`;
|
||||
|
||||
exports[`comments.js [typescript] format 1`] = `
|
||||
"Property or signature expected. (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {
|
||||
Cause: Property or signature expected."
|
||||
`;
|
||||
|
||||
exports[`comments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
@@ -126,38 +91,38 @@ type Type = {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js [babel-ts] format 1`] = `
|
||||
"Unexpected token (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
|
||||
Cause: Unexpected token (5:27)"
|
||||
exports[`comments.js format[babel-ts] 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {
|
||||
Cause: Unexpected token (3:2)"
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js [oxc-ts] format 1`] = `
|
||||
"Unexpected token (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};"
|
||||
exports[`comments.js format[oxc-ts] 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {"
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js [typescript] format 1`] = `
|
||||
"Property or signature expected. (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
|
||||
exports[`comments.js format[typescript] 1`] = `
|
||||
"Property or signature expected. (3:3)
|
||||
1 | type Type = {
|
||||
2 | // comment
|
||||
> 3 | +[T in number]: number;
|
||||
| ^
|
||||
4 | };
|
||||
5 |
|
||||
6 | type Type = {
|
||||
Cause: Property or signature expected."
|
||||
`;
|
||||
|
||||
@@ -217,6 +182,41 @@ type MappedWithComments = {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js format[babel-ts] 1`] = `
|
||||
"Unexpected token (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
|
||||
Cause: Unexpected token (5:27)"
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js format[oxc-ts] 1`] = `
|
||||
"Unexpected token (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};"
|
||||
`;
|
||||
|
||||
exports[`mapped-types.js format[typescript] 1`] = `
|
||||
"Property or signature expected. (5:28)
|
||||
3 | type Mapped = {[key in keyof O]: O[key]};
|
||||
4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
> 5 | type MappedWithVariance = {+[key in keyof O]: number};
|
||||
| ^
|
||||
6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
|
||||
7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
|
||||
8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
|
||||
Cause: Property or signature expected."
|
||||
`;
|
||||
|
||||
exports[`ts-compatibility.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`arrows.js [flow] format 1`] = `
|
||||
"Unexpected token \`)\`, expected the token \`:\` (6:22)
|
||||
4 | // ref: https://github.com/facebook/flow/issues/8731
|
||||
5 |
|
||||
> 6 | (a ? (b = c) : d => e); // a ? (b = c) : (d => e)
|
||||
| ^
|
||||
7 | (a ? (b += c) : d => e); // a ? (b += c) : (d => e)
|
||||
8 |
|
||||
9 | (a ? (b = c) : d => e : f); // a ? ((b = c): d => e) : f"
|
||||
`;
|
||||
|
||||
exports[`arrows.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -58,3 +47,14 @@ a ? (b) => (): e => f : g; // ((a ? (b => (c += d)) : (e => f)) : g)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrows.js format[flow] 1`] = `
|
||||
"Unexpected token \`)\`, expected the token \`:\` (6:22)
|
||||
4 | // ref: https://github.com/facebook/flow/issues/8731
|
||||
5 |
|
||||
> 6 | (a ? (b = c) : d => e); // a ? (b = c) : (d => e)
|
||||
| ^
|
||||
7 | (a ? (b += c) : d => e); // a ? (b += c) : (d => e)
|
||||
8 |
|
||||
9 | (a ? (b = c) : d => e : f); // a ? ((b = c): d => e) : f"
|
||||
`;
|
||||
@@ -1,69 +1,69 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Assigning to rvalue (1:1)
|
||||
> 1 | ({}) = x;
|
||||
| ^
|
||||
Cause: Assigning to rvalue (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [acorn] format 2`] = `
|
||||
exports[`snippet: #0 format[acorn] 2`] = `
|
||||
"The keyword 'let' is reserved (1:21)
|
||||
> 1 | class Foo extends ((let)[0] = 1) {}
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | ({}) = x;
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | ({}) = x;
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Assigning to rvalue (1:1)
|
||||
> 1 | ({}) = x;
|
||||
| ^
|
||||
Cause: Assigning to rvalue"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 2`] = `
|
||||
exports[`snippet: #0 format[espree] 2`] = `
|
||||
"The keyword 'let' is reserved (1:21)
|
||||
> 1 | class Foo extends ((let)[0] = 1) {}
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 3`] = `
|
||||
exports[`snippet: #0 format[espree] 3`] = `
|
||||
"The keyword 'let' is reserved (1:18)
|
||||
> 1 | export default ((let)[0] = 1);
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in assignment (1:6)
|
||||
> 1 | ({}) = x;
|
||||
| ^
|
||||
Cause: [1:5-1:6]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 2`] = `
|
||||
exports[`snippet: #0 format[meriyah] 2`] = `
|
||||
"The identifier 'let' must not be in expression position in strict mode (1:24)
|
||||
> 1 | class Foo extends ((let)[0] = 1) {}
|
||||
| ^
|
||||
Cause: [1:23-1:24]: The identifier 'let' must not be in expression position in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 3`] = `
|
||||
exports[`snippet: #0 format[meriyah] 3`] = `
|
||||
"The identifier 'let' must not be in expression position in strict mode (1:21)
|
||||
> 1 | export default ((let)[0] = 1);
|
||||
| ^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected token (2:26)
|
||||
1 | async function foo() {
|
||||
> 2 | function bar(x = await 2) {}
|
||||
@@ -9,14 +9,14 @@ exports[`snippet: #0 [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:25)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [acorn] format 2`] = `
|
||||
exports[`snippet: #0 format[acorn] 2`] = `
|
||||
"Await expression cannot be a default value (1:12)
|
||||
> 1 | async (x = await (2)) => {};
|
||||
| ^
|
||||
Cause: Await expression cannot be a default value (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"'await' is only allowed within async functions and at the top levels of modules. (2:20)
|
||||
1 | async function foo() {
|
||||
> 2 | function bar(x = await 2) {}
|
||||
@@ -25,14 +25,14 @@ exports[`snippet: #0 [babel] format 1`] = `
|
||||
Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:19)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 2`] = `
|
||||
exports[`snippet: #0 format[babel] 2`] = `
|
||||
"'await' is not allowed in async function parameters. (1:12)
|
||||
> 1 | async (x = await (2)) => {};
|
||||
| ^
|
||||
Cause: 'await' is not allowed in async function parameters. (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Cannot use keyword 'await' outside an async function (2:20)
|
||||
1 | async function foo() {
|
||||
> 2 | function bar(x = await 2) {}
|
||||
@@ -41,14 +41,14 @@ exports[`snippet: #0 [espree] format 1`] = `
|
||||
Cause: Cannot use keyword 'await' outside an async function"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 2`] = `
|
||||
exports[`snippet: #0 format[espree] 2`] = `
|
||||
"Await expression cannot be a default value (1:12)
|
||||
> 1 | async (x = await (2)) => {};
|
||||
| ^
|
||||
Cause: Await expression cannot be a default value"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected number, expected the token \`,\` (2:26)
|
||||
1 | async function foo() {
|
||||
> 2 | function bar(x = await 2) {}
|
||||
@@ -56,13 +56,13 @@ exports[`snippet: #0 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 2`] = `
|
||||
exports[`snippet: #0 format[flow] 2`] = `
|
||||
"\`await\` is not allowed in async function parameters. (1:12)
|
||||
> 1 | async (x = await (2)) => {};
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Await expression not allowed in formal parameter (2:20)
|
||||
1 | async function foo() {
|
||||
> 2 | function bar(x = await 2) {}
|
||||
@@ -71,272 +71,272 @@ exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
Cause: [2:19-2:24]: Await expression not allowed in formal parameter"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Await expression cannot be a default value (1:12)
|
||||
> 1 | async (x = await 2) => {};
|
||||
| ^
|
||||
Cause: Await expression cannot be a default value (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"'await' is not allowed in async function parameters. (1:12)
|
||||
> 1 | async (x = await 2) => {};
|
||||
| ^
|
||||
Cause: 'await' is not allowed in async function parameters. (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Await expression cannot be a default value (1:12)
|
||||
> 1 | async (x = await 2) => {};
|
||||
| ^
|
||||
Cause: Await expression cannot be a default value"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"\`await\` is not allowed in async function parameters. (1:12)
|
||||
> 1 | async (x = await 2) => {};
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Await expression not allowed in formal parameter (1:21)
|
||||
> 1 | async (x = await 2) => {};
|
||||
| ^^
|
||||
Cause: [1:20-1:22]: Await expression not allowed in formal parameter"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Unexpected token (1:25)
|
||||
> 1 | f = async (a) => await a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:24)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Unexpected token (1:27)
|
||||
> 1 | f = async (a) => await a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:26)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Unexpected token ! (1:25)
|
||||
> 1 | f = async (a) => await a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token !"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:25)
|
||||
> 1 | f = async (a) => await a! ** 6;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Unexpected token: '!' (1:25)
|
||||
> 1 | f = async (a) => await a! ** 6;
|
||||
| ^
|
||||
Cause: [1:24-1:25]: Unexpected token: '!'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | f = (a) => +a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | f = (a) => +a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Unexpected token ! (1:14)
|
||||
> 1 | f = (a) => +a! ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token !"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:14)
|
||||
> 1 | f = (a) => +a! ** 6;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"Unexpected token: '!' (1:14)
|
||||
> 1 | f = (a) => +a! ** 6;
|
||||
| ^
|
||||
Cause: [1:13-1:14]: Unexpected token: '!'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Unexpected token (1:22)
|
||||
> 1 | async (a) => (await a!) ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Unexpected token, expected "," (1:22)
|
||||
> 1 | async (a) => (await a!) ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token, expected "," (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Unexpected token ! (1:22)
|
||||
> 1 | async (a) => (await a!) ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token !"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 1`] = `
|
||||
exports[`snippet: #4 format[flow] 1`] = `
|
||||
"Unexpected token \`!\`, expected the token \`)\` (1:22)
|
||||
> 1 | async (a) => (await a!) ** 6;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
exports[`snippet: #4 format[meriyah] 1`] = `
|
||||
"Expected ')' (1:22)
|
||||
> 1 | async (a) => (await a!) ** 6;
|
||||
| ^
|
||||
Cause: [1:21-1:22]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [acorn] format 1`] = `
|
||||
exports[`snippet: #5 format[acorn] 1`] = `
|
||||
"Unexpected token (1:6)
|
||||
> 1 | (-+5 ** 6);
|
||||
| ^
|
||||
Cause: Unexpected token (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel] format 1`] = `
|
||||
exports[`snippet: #5 format[babel] 1`] = `
|
||||
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:3)
|
||||
> 1 | (-+5 ** 6);
|
||||
| ^
|
||||
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [espree] format 1`] = `
|
||||
exports[`snippet: #5 format[espree] 1`] = `
|
||||
"Unexpected token ** (1:6)
|
||||
> 1 | (-+5 ** 6);
|
||||
| ^
|
||||
Cause: Unexpected token **"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [flow] format 1`] = `
|
||||
exports[`snippet: #5 format[flow] 1`] = `
|
||||
"Invalid left-hand side in exponentiation expression (1:2)
|
||||
> 1 | (-+5 ** 6);
|
||||
| ^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [meriyah] format 1`] = `
|
||||
exports[`snippet: #5 format[meriyah] 1`] = `
|
||||
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:6)
|
||||
> 1 | (-+5 ** 6);
|
||||
| ^^
|
||||
Cause: [1:5-1:7]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [acorn] format 1`] = `
|
||||
exports[`snippet: #6 format[acorn] 1`] = `
|
||||
"Unexpected token (1:25)
|
||||
> 1 | f = async () => await 5 ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:24)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [babel] format 1`] = `
|
||||
exports[`snippet: #6 format[babel] 1`] = `
|
||||
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23)
|
||||
> 1 | f = async () => await 5 ** 6;
|
||||
| ^
|
||||
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [espree] format 1`] = `
|
||||
exports[`snippet: #6 format[espree] 1`] = `
|
||||
"Unexpected token ** (1:25)
|
||||
> 1 | f = async () => await 5 ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token **"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [flow] format 1`] = `
|
||||
exports[`snippet: #6 format[flow] 1`] = `
|
||||
"Invalid left-hand side in exponentiation expression (1:17)
|
||||
> 1 | f = async () => await 5 ** 6;
|
||||
| ^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [meriyah] format 1`] = `
|
||||
exports[`snippet: #6 format[meriyah] 1`] = `
|
||||
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:25)
|
||||
> 1 | f = async () => await 5 ** 6;
|
||||
| ^^
|
||||
Cause: [1:24-1:26]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [acorn] format 1`] = `
|
||||
exports[`snippet: #7 format[acorn] 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | f = async () => await -5 ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token (1:25)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [babel] format 1`] = `
|
||||
exports[`snippet: #7 format[babel] 1`] = `
|
||||
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23)
|
||||
> 1 | f = async () => await -5 ** 6;
|
||||
| ^
|
||||
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [espree] format 1`] = `
|
||||
exports[`snippet: #7 format[espree] 1`] = `
|
||||
"Unexpected token ** (1:26)
|
||||
> 1 | f = async () => await -5 ** 6;
|
||||
| ^
|
||||
Cause: Unexpected token **"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [flow] format 1`] = `
|
||||
exports[`snippet: #7 format[flow] 1`] = `
|
||||
"Invalid left-hand side in exponentiation expression (1:17)
|
||||
> 1 | f = async () => await -5 ** 6;
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [meriyah] format 1`] = `
|
||||
exports[`snippet: #7 format[meriyah] 1`] = `
|
||||
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:26)
|
||||
> 1 | f = async () => await -5 ** 6;
|
||||
| ^^
|
||||
Cause: [1:25-1:27]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [acorn] format 1`] = `
|
||||
exports[`snippet: #8 format[acorn] 1`] = `
|
||||
"Shorthand property assignments are valid only in destructuring patterns (1:15)
|
||||
> 1 | async({ foo33 = 1 });
|
||||
| ^
|
||||
Cause: Shorthand property assignments are valid only in destructuring patterns (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [babel] format 1`] = `
|
||||
exports[`snippet: #8 format[babel] 1`] = `
|
||||
"Invalid shorthand property initializer. (1:15)
|
||||
> 1 | async({ foo33 = 1 });
|
||||
| ^
|
||||
Cause: Invalid shorthand property initializer. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [espree] format 1`] = `
|
||||
exports[`snippet: #8 format[espree] 1`] = `
|
||||
"Shorthand property assignments are valid only in destructuring patterns (1:15)
|
||||
> 1 | async({ foo33 = 1 });
|
||||
| ^
|
||||
Cause: Shorthand property assignments are valid only in destructuring patterns"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [flow] format 1`] = `
|
||||
exports[`snippet: #8 format[flow] 1`] = `
|
||||
"Unexpected token \`=\` (1:15)
|
||||
> 1 | async({ foo33 = 1 });
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [meriyah] format 1`] = `
|
||||
exports[`snippet: #8 format[meriyah] 1`] = `
|
||||
"Invalid shorthand property initializer (1:21)
|
||||
> 1 | async({ foo33 = 1 });
|
||||
| ^
|
||||
|
||||
+60
-216
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -9,7 +9,7 @@ exports[`snippet: #0 [acorn] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -18,7 +18,7 @@ exports[`snippet: #0 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -27,16 +27,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -45,7 +36,7 @@ exports[`snippet: #0 [espree] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -53,7 +44,7 @@ exports[`snippet: #0 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
@@ -64,7 +55,7 @@ Cause: invalid class property name (2:2)
|
||||
^~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
@@ -73,7 +64,7 @@ exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc] 1`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
@@ -81,7 +72,7 @@ exports[`snippet: #0 [oxc] format 1`] = `
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc-ts] 1`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
@@ -89,15 +80,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc-ts] format 2`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | constructor
|
||||
> 3 | }
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
@@ -106,16 +89,7 @@ exports[`snippet: #0 [typescript] format 1`] = `
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 2`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -124,7 +98,7 @@ exports[`snippet: #1 [acorn] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -133,7 +107,7 @@ exports[`snippet: #1 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -142,16 +116,7 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -160,7 +125,7 @@ exports[`snippet: #1 [espree] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -168,7 +133,7 @@ exports[`snippet: #1 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [hermes] format 1`] = `
|
||||
exports[`snippet: #1 format[hermes] 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -179,7 +144,7 @@ Cause: invalid class property name (2:2)
|
||||
^~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | 'constructor'
|
||||
@@ -188,7 +153,7 @@ exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -196,7 +161,7 @@ exports[`snippet: #1 [oxc] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc-ts] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -204,15 +169,7 @@ exports[`snippet: #1 [oxc-ts] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc-ts] format 2`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -221,16 +178,7 @@ exports[`snippet: #1 [typescript] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -239,7 +187,7 @@ exports[`snippet: #2 [acorn] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -248,7 +196,7 @@ exports[`snippet: #2 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -257,16 +205,7 @@ exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -275,7 +214,7 @@ exports[`snippet: #2 [espree] format 1`] = `
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -283,7 +222,7 @@ exports[`snippet: #2 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [hermes] format 1`] = `
|
||||
exports[`snippet: #2 format[hermes] 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -294,7 +233,7 @@ Cause: invalid class property name (2:2)
|
||||
^~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | 'constructor'
|
||||
@@ -303,7 +242,7 @@ exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -311,7 +250,7 @@ exports[`snippet: #2 [oxc] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc-ts] 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -319,15 +258,7 @@ exports[`snippet: #2 [oxc-ts] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc-ts] format 2`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
exports[`snippet: #2 format[typescript] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
@@ -336,16 +267,7 @@ exports[`snippet: #2 [typescript] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -354,7 +276,7 @@ exports[`snippet: #3 [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -363,7 +285,7 @@ exports[`snippet: #3 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -372,16 +294,7 @@ exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Unexpected token 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -390,7 +303,7 @@ exports[`snippet: #3 [espree] format 1`] = `
|
||||
Cause: Unexpected token 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected string, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -398,7 +311,7 @@ exports[`snippet: #3 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [hermes] format 1`] = `
|
||||
exports[`snippet: #3 format[hermes] 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -409,7 +322,7 @@ Cause: ';' expected after class property (2:11)
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor 'constructor'
|
||||
@@ -418,7 +331,7 @@ exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc] 1`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -426,7 +339,7 @@ exports[`snippet: #3 [oxc] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -434,15 +347,7 @@ exports[`snippet: #3 [oxc-ts] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 1`] = `
|
||||
exports[`snippet: #3 format[typescript] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -451,16 +356,7 @@ exports[`snippet: #3 [typescript] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -469,7 +365,7 @@ exports[`snippet: #4 [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -478,7 +374,7 @@ exports[`snippet: #4 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #4 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -487,16 +383,7 @@ exports[`snippet: #4 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Unexpected token 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -505,7 +392,7 @@ exports[`snippet: #4 [espree] format 1`] = `
|
||||
Cause: Unexpected token 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 1`] = `
|
||||
exports[`snippet: #4 format[flow] 1`] = `
|
||||
"Unexpected string, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -513,7 +400,7 @@ exports[`snippet: #4 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [hermes] format 1`] = `
|
||||
exports[`snippet: #4 format[hermes] 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -524,7 +411,7 @@ Cause: ';' expected after class property (2:11)
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
exports[`snippet: #4 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor 'constructor'
|
||||
@@ -533,7 +420,7 @@ exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [oxc] format 1`] = `
|
||||
exports[`snippet: #4 format[oxc] 1`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -541,7 +428,7 @@ exports[`snippet: #4 [oxc] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #4 format[oxc-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -549,15 +436,7 @@ exports[`snippet: #4 [oxc-ts] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [oxc-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor' (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 1`] = `
|
||||
exports[`snippet: #4 format[typescript] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
@@ -566,16 +445,7 @@ exports[`snippet: #4 [typescript] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [acorn] format 1`] = `
|
||||
exports[`snippet: #5 format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -584,7 +454,7 @@ exports[`snippet: #5 [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel] format 1`] = `
|
||||
exports[`snippet: #5 format[babel] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -593,7 +463,7 @@ exports[`snippet: #5 [babel] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #5 format[babel-ts] 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -602,16 +472,7 @@ exports[`snippet: #5 [babel-ts] format 1`] = `
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [espree] format 1`] = `
|
||||
exports[`snippet: #5 format[espree] 1`] = `
|
||||
"Unexpected token constructor (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -620,7 +481,7 @@ exports[`snippet: #5 [espree] format 1`] = `
|
||||
Cause: Unexpected token constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [flow] format 1`] = `
|
||||
exports[`snippet: #5 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -628,7 +489,7 @@ exports[`snippet: #5 [flow] format 1`] = `
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [hermes] format 1`] = `
|
||||
exports[`snippet: #5 format[hermes] 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
@@ -639,7 +500,7 @@ Cause: ';' expected after class property (2:11)
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [meriyah] format 1`] = `
|
||||
exports[`snippet: #5 format[meriyah] 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
@@ -648,7 +509,7 @@ exports[`snippet: #5 [meriyah] format 1`] = `
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [oxc] format 1`] = `
|
||||
exports[`snippet: #5 format[oxc] 1`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
@@ -656,7 +517,7 @@ exports[`snippet: #5 [oxc] format 1`] = `
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #5 format[oxc-ts] 1`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
@@ -664,15 +525,7 @@ exports[`snippet: #5 [oxc-ts] format 1`] = `
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [oxc-ts] format 2`] = `
|
||||
"Expected \`(\` but found \`}\` (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | accessor constructor
|
||||
> 3 | }
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [typescript] format 1`] = `
|
||||
exports[`snippet: #5 format[typescript] 1`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
@@ -680,12 +533,3 @@ exports[`snippet: #5 [typescript] format 1`] = `
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [typescript] format 2`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | accessor constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
@@ -1,42 +1,9 @@
|
||||
import { outdent } from "outdent";
|
||||
|
||||
const cases = [
|
||||
outdent`
|
||||
class Foo {
|
||||
constructor
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor constructor
|
||||
}
|
||||
`,
|
||||
];
|
||||
import { testCases } from "../../../misc/shared-fixtures/class-property-named-constructor.js";
|
||||
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: cases,
|
||||
snippets: testCases,
|
||||
},
|
||||
[
|
||||
"babel",
|
||||
@@ -51,11 +18,3 @@ runFormatTest(
|
||||
"hermes",
|
||||
],
|
||||
);
|
||||
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: cases.map((code) => `abstract ${code}`),
|
||||
},
|
||||
["typescript", "babel-ts", "oxc-ts"],
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
+12
-12
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = `
|
||||
exports[`invalid-for-await-using-binding-of-of.js format[babel] 1`] = `
|
||||
"Unexpected token, expected ")" (1:24)
|
||||
> 1 | for await (using of of of);
|
||||
| ^
|
||||
@@ -8,14 +8,14 @@ exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = `
|
||||
Cause: Unexpected token, expected ")" (1:23)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-using-binding-of-of.js [flow] format 1`] = `
|
||||
exports[`invalid-for-await-using-binding-of-of.js format[flow] 1`] = `
|
||||
"Unexpected token \`await\`, expected the token \`(\` (1:5)
|
||||
> 1 | for await (using of of of);
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-in.js [babel] format 1`] = `
|
||||
exports[`invalid-for-using-binding-in.js format[babel] 1`] = `
|
||||
"For-in loop may not start with 'using' declaration. (1:6)
|
||||
> 1 | for (using foo in {});
|
||||
| ^
|
||||
@@ -23,14 +23,14 @@ exports[`invalid-for-using-binding-in.js [babel] format 1`] = `
|
||||
Cause: For-in loop may not start with 'using' declaration. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-in.js [flow] format 1`] = `
|
||||
exports[`invalid-for-using-binding-in.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`;\` (1:12)
|
||||
> 1 | for (using foo in {});
|
||||
| ^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = `
|
||||
exports[`invalid-for-using-binding-of-in.js format[babel] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | for (using of in []);
|
||||
| ^
|
||||
@@ -38,14 +38,14 @@ exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = `
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-of-in.js [flow] format 1`] = `
|
||||
exports[`invalid-for-using-binding-of-in.js format[flow] 1`] = `
|
||||
"Unexpected token \`in\` (1:15)
|
||||
> 1 | for (using of in []);
|
||||
| ^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = `
|
||||
exports[`invalid-for-using-binding-of-of.js format[babel] 1`] = `
|
||||
"Unexpected token, expected ")" (1:18)
|
||||
> 1 | for (using of of of);
|
||||
| ^
|
||||
@@ -53,14 +53,14 @@ exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = `
|
||||
Cause: Unexpected token, expected ")" (1:17)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-using-binding-of-of.js [flow] format 1`] = `
|
||||
exports[`invalid-for-using-binding-of-of.js format[flow] 1`] = `
|
||||
"Unexpected token \`of\`, expected the token \`)\` (1:18)
|
||||
> 1 | for (using of of of);
|
||||
| ^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-using-binding-let.js [babel] format 1`] = `
|
||||
exports[`invalid-using-binding-let.js format[babel] 1`] = `
|
||||
"'let' is disallowed as a lexically bound name. (2:9)
|
||||
1 | {
|
||||
> 2 | using let = h();
|
||||
@@ -70,7 +70,7 @@ exports[`invalid-using-binding-let.js [babel] format 1`] = `
|
||||
Cause: 'let' is disallowed as a lexically bound name. (2:8)"
|
||||
`;
|
||||
|
||||
exports[`invalid-using-binding-let.js [flow] format 1`] = `
|
||||
exports[`invalid-using-binding-let.js format[flow] 1`] = `
|
||||
"Unexpected token \`let\`, expected the end of an expression statement (\`;\`) (2:9)
|
||||
1 | {
|
||||
> 2 | using let = h();
|
||||
@@ -79,7 +79,7 @@ exports[`invalid-using-binding-let.js [flow] format 1`] = `
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-using-binding-pattern.js [babel] format 1`] = `
|
||||
exports[`invalid-using-binding-pattern.js format[babel] 1`] = `
|
||||
"Unexpected token, expected ")" (4:25)
|
||||
2 | using { foo } = f();
|
||||
3 | using [ bar ] = g();
|
||||
@@ -91,7 +91,7 @@ exports[`invalid-using-binding-pattern.js [babel] format 1`] = `
|
||||
Cause: Unexpected token, expected ")" (4:24)"
|
||||
`;
|
||||
|
||||
exports[`invalid-using-binding-pattern.js [flow] format 1`] = `
|
||||
exports[`invalid-using-binding-pattern.js format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (2:9)
|
||||
1 | {
|
||||
> 2 | using { foo } = f();
|
||||
|
||||
@@ -1,61 +1,61 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [__babel_estree] format 1`] = `
|
||||
exports[`snippet: #0 format[__babel_estree] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 2`] = `
|
||||
exports[`snippet: #0 format[espree] 2`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"'identifier' expected in import specifier (1:9)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
@@ -64,81 +64,81 @@ import { "\\uD83C" as b } from "./foo";
|
||||
~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"An export name cannot include a lone surrogate (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^
|
||||
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc-ts] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | import { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [__babel_estree] format 1`] = `
|
||||
exports[`snippet: #1 format[__babel_estree] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 2`] = `
|
||||
exports[`snippet: #1 format[espree] 2`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [hermes] format 1`] = `
|
||||
exports[`snippet: #1 format[hermes] 1`] = `
|
||||
"'identifier' expected in export clause (1:9)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
@@ -147,81 +147,81 @@ export { "\\uD83C" } from "./foo";
|
||||
~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"An export name cannot include a lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^
|
||||
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc-ts] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [__babel_estree] format 1`] = `
|
||||
exports[`snippet: #2 format[__babel_estree] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 2`] = `
|
||||
exports[`snippet: #2 format[espree] 2`] = `
|
||||
"An export name cannot include a lone surrogate. (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [hermes] format 1`] = `
|
||||
exports[`snippet: #2 format[hermes] 1`] = `
|
||||
"'identifier' expected in export clause (1:9)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^
|
||||
@@ -230,81 +230,81 @@ export { "\\uD83C" as b } from "./foo";
|
||||
~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"An export name cannot include a lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^
|
||||
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc-ts] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:10)
|
||||
> 1 | export { "\\uD83C" as b } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [__babel_estree] format 1`] = `
|
||||
exports[`snippet: #3 format[__babel_estree] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-flow] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 1`] = `
|
||||
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"An export name cannot include a lone surrogate. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 2`] = `
|
||||
exports[`snippet: #3 format[espree] 2`] = `
|
||||
"An export name cannot include a lone surrogate. (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
Cause: An export name cannot include a lone surrogate."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [hermes] format 1`] = `
|
||||
exports[`snippet: #3 format[hermes] 1`] = `
|
||||
"'identifier' expected in export clause (1:14)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^
|
||||
@@ -313,20 +313,20 @@ export { b as "\\uD83C" } from "./foo";
|
||||
~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"An export name cannot include a lone surrogate (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^
|
||||
Cause: [1:14-1:22]: An export name cannot include a lone surrogate"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc-ts] 1`] = `
|
||||
"An export name cannot include a unicode lone surrogate (1:15)
|
||||
> 1 | export { b as "\\uD83C" } from "./foo";
|
||||
| ^^^^^^^^"
|
||||
|
||||
@@ -1,184 +1,184 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | for (async of []);
|
||||
| ^
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 2`] = `
|
||||
exports[`snippet: #0 format[babel] 2`] = `
|
||||
"The left-hand side of a for-of loop may not be 'async'. (1:6)
|
||||
> 1 | for (async of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 2`] = `
|
||||
"The left-hand side of a for-of loop may not be 'async'. (1:6)
|
||||
> 1 | for (async of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 2`] = `
|
||||
"The left-hand side of a for-of loop may not be 'async'. (1:6)
|
||||
> 1 | for (async of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"The keyword 'let' is reserved (1:6)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 2`] = `
|
||||
exports[`snippet: #0 format[espree] 2`] = `
|
||||
"Unexpected token [ (1:15)
|
||||
> 1 | for (async of []);
|
||||
| ^
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`.\`, expected an identifier (1:9)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 2`] = `
|
||||
exports[`snippet: #0 format[flow] 2`] = `
|
||||
"Invalid left-hand side in for-of (1:6)
|
||||
> 1 | for (async of []);
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"Variable declaration expected. (1:9)
|
||||
> 1 | for (let.foo of []);
|
||||
| ^
|
||||
Cause: Variable declaration expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"The keyword 'let' is reserved (1:6)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected token \`(\`, expected an identifier (1:9)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"Variable declaration expected. (1:9)
|
||||
> 1 | for (let().bar of []);
|
||||
| ^
|
||||
Cause: Variable declaration expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^
|
||||
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"The keyword 'let' is reserved (1:6)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected template literal part, expected an identifier (1:9)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^^
|
||||
Cause: [1:8-1:10]: Identifier "let" disallowed as left-hand side expression in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
exports[`snippet: #2 format[typescript] 1`] = `
|
||||
"Variable declaration expected. (1:9)
|
||||
> 1 | for (let\`\`.bar of []);
|
||||
| ^
|
||||
|
||||
@@ -1,163 +1,163 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:7)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:7)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:7)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`)\` (1:8)
|
||||
> 1 | import();
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Unexpected token: ')' (1:8)
|
||||
> 1 | import();
|
||||
| ^
|
||||
Cause: [1:7-1:8]: Unexpected token: ')'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"Dynamic import requires exactly one or two arguments. (1:1)
|
||||
> 1 | import();
|
||||
| ^^^^^^^^
|
||||
Cause: Dynamic import requires exactly one or two arguments."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Unexpected token (1:21)
|
||||
> 1 | import(/* comment */);
|
||||
| ^
|
||||
Cause: Unexpected token (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 1`] = `
|
||||
"Unexpected token (1:21)
|
||||
> 1 | import(/* comment */);
|
||||
| ^
|
||||
Cause: Unexpected token (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:21)
|
||||
> 1 | import(/* comment */);
|
||||
| ^
|
||||
Cause: Unexpected token (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected token \`)\` (1:21)
|
||||
> 1 | import(/* comment */);
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Unexpected token: ')' (1:21)
|
||||
> 1 | import(/* comment */);
|
||||
| ^
|
||||
Cause: [1:20-1:21]: Unexpected token: ')'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"Dynamic import requires exactly one or two arguments. (1:1)
|
||||
> 1 | import(/* comment */);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
Cause: Dynamic import requires exactly one or two arguments."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Cannot use new with import(...). (1:5)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^
|
||||
Cause: Cannot use new with import(...). (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 1`] = `
|
||||
"Cannot use new with import(...). (1:5)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^
|
||||
Cause: Cannot use new with import(...). (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"Cannot use new with import(...). (1:5)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^
|
||||
Cause: Cannot use new with import(...). (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected token \`import\` (1:5)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Cannot use new with import(...) (1:11)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^
|
||||
Cause: [1:10-1:11]: Cannot use new with import(...)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
exports[`snippet: #2 format[typescript] 1`] = `
|
||||
"Expression expected. (1:5)
|
||||
> 1 | new import('./a.mjs');
|
||||
| ^
|
||||
Cause: Expression expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Unexpected token (1:12)
|
||||
> 1 | new import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-flow] 1`] = `
|
||||
"Unexpected token (1:12)
|
||||
> 1 | new import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:12)
|
||||
> 1 | new import();
|
||||
| ^
|
||||
Cause: Unexpected token (1:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected token \`import\` (1:5)
|
||||
> 1 | new import();
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"Cannot use new with import(...) (1:11)
|
||||
> 1 | new import();
|
||||
| ^
|
||||
Cause: [1:10-1:11]: Cannot use new with import(...)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 1`] = `
|
||||
exports[`snippet: #3 format[typescript] 1`] = `
|
||||
"Expression expected. (1:5)
|
||||
> 1 | new import();
|
||||
| ^
|
||||
|
||||
@@ -1,444 +1,444 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected token (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: Unexpected token (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Unexpected token, expected "(" (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "(" (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 2`] = `
|
||||
exports[`snippet: #0 format[babel] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "(" (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "(" (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #0 format[babel-flow] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Unexpected token, expected "(" (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: Unexpected token, expected "(" (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Unexpected token each (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: Unexpected token each"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the token \`(\` (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 2`] = `
|
||||
exports[`snippet: #0 format[flow] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:2)
|
||||
> 1 | (a = b) = 1
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Expected '(' (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^^^^
|
||||
Cause: [1:4-1:8]: Expected '('"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 2`] = `
|
||||
exports[`snippet: #0 format[meriyah] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:9)
|
||||
> 1 | (a = b) = 1
|
||||
| ^
|
||||
Cause: [1:8-1:9]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"'(' expected. (1:5)
|
||||
> 1 | for each (a in b) {}
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Unexpected token (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: Unexpected token (1:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"A class name is required. (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: A class name is required. (1:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 2`] = `
|
||||
exports[`snippet: #1 format[babel] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:5)
|
||||
> 1 | a = 1 = 2
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 1`] = `
|
||||
"A class name is required. (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: A class name is required. (1:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #1 format[babel-flow] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:5)
|
||||
> 1 | a = 1 = 2
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"A class name is required. (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: A class name is required. (1:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:5)
|
||||
> 1 | a = 1 = 2
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:4)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Unexpected token switch (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: Unexpected token switch"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected token \`switch\`, expected an identifier (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 2`] = `
|
||||
exports[`snippet: #1 format[flow] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:5)
|
||||
> 1 | a = 1 = 2
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Unexpected strict mode reserved word (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^^^^^^
|
||||
Cause: [1:6-1:12]: Unexpected strict mode reserved word"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 2`] = `
|
||||
exports[`snippet: #1 format[meriyah] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:7)
|
||||
> 1 | a = 1 = 2
|
||||
| ^
|
||||
Cause: [1:6-1:7]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"'{' expected. (1:7)
|
||||
> 1 | class switch() {}
|
||||
| ^
|
||||
Cause: '{' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Unexpected token (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: Unexpected token (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Unexpected token, expected "{" (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 2`] = `
|
||||
exports[`snippet: #2 format[babel] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = 1) = 2
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #2 format[babel-flow] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = 1) = 2
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"Unexpected token, expected "{" (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:12)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a = 1) = 2
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Unexpected token } (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: Unexpected token }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`, expected the token \`{\` (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 2`] = `
|
||||
exports[`snippet: #2 format[flow] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:2)
|
||||
> 1 | (a = 1) = 2
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Expected '{' (1:13)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: [1:12-1:13]: Expected '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 2`] = `
|
||||
exports[`snippet: #2 format[meriyah] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:9)
|
||||
> 1 | (a = 1) = 2
|
||||
| ^
|
||||
Cause: [1:8-1:9]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
exports[`snippet: #2 format[typescript] 1`] = `
|
||||
"'{' expected. (1:11)
|
||||
> 1 | ({ method() })
|
||||
| ^
|
||||
Cause: '{' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Unexpected token, expected "{" (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 2`] = `
|
||||
exports[`snippet: #3 format[babel] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a += b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #3 format[babel-flow] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a += b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 1`] = `
|
||||
"Unexpected token, expected "{" (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 2`] = `
|
||||
"Invalid parenthesized assignment pattern. (1:1)
|
||||
> 1 | (a += b) = 1
|
||||
| ^
|
||||
Cause: Invalid parenthesized assignment pattern. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Unexpected token } (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: Unexpected token }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`, expected the token \`{\` (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 2`] = `
|
||||
exports[`snippet: #3 format[flow] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:2)
|
||||
> 1 | (a += b) = 1
|
||||
| ^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"Expected '{' (1:15)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: [1:14-1:15]: Expected '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 2`] = `
|
||||
exports[`snippet: #3 format[meriyah] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:10)
|
||||
> 1 | (a += b) = 1
|
||||
| ^
|
||||
Cause: [1:9-1:10]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 1`] = `
|
||||
exports[`snippet: #3 format[typescript] 1`] = `
|
||||
"'{' expected. (1:13)
|
||||
> 1 | ({ method({}) })
|
||||
| ^
|
||||
Cause: '{' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Unexpected token, expected "{" (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 2`] = `
|
||||
exports[`snippet: #4 format[babel] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:2)
|
||||
> 1 | (a = b) += 1
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-flow] format 1`] = `
|
||||
exports[`snippet: #4 format[babel-flow] 1`] = `
|
||||
"Unexpected token, expected "{" (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-flow] format 2`] = `
|
||||
exports[`snippet: #4 format[babel-flow] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:2)
|
||||
> 1 | (a = b) += 1
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #4 format[babel-ts] 1`] = `
|
||||
"Unexpected token, expected "{" (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: Unexpected token, expected "{" (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 2`] = `
|
||||
exports[`snippet: #4 format[babel-ts] 2`] = `
|
||||
"Invalid left-hand side in assignment expression. (1:2)
|
||||
> 1 | (a = b) += 1
|
||||
| ^
|
||||
Cause: Invalid left-hand side in assignment expression. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Unexpected token } (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: Unexpected token }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 1`] = `
|
||||
exports[`snippet: #4 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`, expected the token \`{\` (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 2`] = `
|
||||
exports[`snippet: #4 format[flow] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:2)
|
||||
> 1 | (a = b) += 1
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
exports[`snippet: #4 format[meriyah] 1`] = `
|
||||
"Expected '{' (1:23)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
Cause: [1:22-1:23]: Expected '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 2`] = `
|
||||
exports[`snippet: #4 format[meriyah] 2`] = `
|
||||
"Invalid left-hand side in assignment (1:9)
|
||||
> 1 | (a = b) += 1
|
||||
| ^^
|
||||
Cause: [1:8-1:10]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 1`] = `
|
||||
exports[`snippet: #4 format[typescript] 1`] = `
|
||||
"'{' expected. (1:21)
|
||||
> 1 | ({ method(parameter,) })
|
||||
| ^
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"'import' and 'export' may appear only with 'sourceType: module' (1:1)
|
||||
> 1 | import "foo"
|
||||
| ^
|
||||
Cause: 'import' and 'export' may appear only with 'sourceType: module' (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"'import' and 'export' may appear only with 'sourceType: module' (1:1)
|
||||
> 1 | import "foo"
|
||||
| ^
|
||||
Cause: 'import' and 'export' may appear only with 'sourceType: module'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"The import keyword can only be used with the module goal (1:8)
|
||||
> 1 | import "foo"
|
||||
| ^^^^^
|
||||
Cause: [1:7-1:12]: The import keyword can only be used with the module goal"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"'with' in strict mode (1:1)
|
||||
> 1 | with(foo) {}
|
||||
| ^
|
||||
Cause: 'with' in strict mode (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"'with' in strict mode (1:1)
|
||||
> 1 | with(foo) {}
|
||||
| ^
|
||||
Cause: 'with' in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Strict mode code may not include a with statement (1:5)
|
||||
> 1 | with(foo) {}
|
||||
| ^
|
||||
Cause: [1:4-1:5]: Strict mode code may not include a with statement"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Deleting local variable in strict mode (1:1)
|
||||
> 1 | delete foo
|
||||
| ^
|
||||
Cause: Deleting local variable in strict mode (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Deleting local variable in strict mode (1:1)
|
||||
> 1 | delete foo
|
||||
| ^
|
||||
Cause: Deleting local variable in strict mode"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Calling delete on expression not allowed in strict mode (1:8)
|
||||
> 1 | delete foo
|
||||
| ^^^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-exponent.js [acorn] format 1`] = `
|
||||
exports[`invalid-exponent.js format[acorn] 1`] = `
|
||||
"Invalid number (1:1)
|
||||
> 1 | 12.3e
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ exports[`invalid-exponent.js [acorn] format 1`] = `
|
||||
Cause: Invalid number (1:0)"
|
||||
`;
|
||||
|
||||
exports[`invalid-exponent.js [babel] format 1`] = `
|
||||
exports[`invalid-exponent.js format[babel] 1`] = `
|
||||
"Floating-point numbers require a valid exponent after the 'e'. (1:1)
|
||||
> 1 | 12.3e
|
||||
| ^
|
||||
@@ -16,7 +16,7 @@ exports[`invalid-exponent.js [babel] format 1`] = `
|
||||
Cause: Floating-point numbers require a valid exponent after the 'e'. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`invalid-exponent.js [espree] format 1`] = `
|
||||
exports[`invalid-exponent.js format[espree] 1`] = `
|
||||
"Invalid number (1:1)
|
||||
> 1 | 12.3e
|
||||
| ^
|
||||
@@ -24,7 +24,7 @@ exports[`invalid-exponent.js [espree] format 1`] = `
|
||||
Cause: Invalid number"
|
||||
`;
|
||||
|
||||
exports[`invalid-exponent.js [meriyah] format 1`] = `
|
||||
exports[`invalid-exponent.js format[meriyah] 1`] = `
|
||||
"Non-number found after exponent indicator (1:1)
|
||||
> 1 | 12.3e
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`newline-before-arrow.js [acorn] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:1)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -9,7 +9,7 @@ exports[`newline-before-arrow.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:0)"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [babel] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[babel] 1`] = `
|
||||
"No line break is allowed before '=>'. (2:3)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -18,7 +18,7 @@ exports[`newline-before-arrow.js [babel] format 1`] = `
|
||||
Cause: No line break is allowed before '=>'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [babel-ts] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[babel-ts] 1`] = `
|
||||
"No line break is allowed before '=>'. (2:3)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -27,7 +27,7 @@ exports[`newline-before-arrow.js [babel-ts] format 1`] = `
|
||||
Cause: No line break is allowed before '=>'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [babel-ts] format 2`] = `
|
||||
exports[`newline-before-arrow.js format[babel-ts] 2`] = `
|
||||
"No line break is allowed before '=>'. (2:3)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -36,7 +36,7 @@ exports[`newline-before-arrow.js [babel-ts] format 2`] = `
|
||||
Cause: No line break is allowed before '=>'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [espree] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[espree] 1`] = `
|
||||
"Unexpected token => (2:1)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -45,7 +45,7 @@ exports[`newline-before-arrow.js [espree] format 1`] = `
|
||||
Cause: Unexpected token =>"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [flow] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[flow] 1`] = `
|
||||
"Illegal newline before arrow (2:1)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -53,7 +53,7 @@ exports[`newline-before-arrow.js [flow] format 1`] = `
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [meriyah] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[meriyah] 1`] = `
|
||||
"No line break is allowed after '=>' (2:1)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -62,7 +62,7 @@ exports[`newline-before-arrow.js [meriyah] format 1`] = `
|
||||
Cause: [2:0-2:2]: No line break is allowed after '=>'"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [oxc] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[oxc] 1`] = `
|
||||
"Line terminator not permitted before arrow (2:1)
|
||||
1 | async x
|
||||
> 2 | => x
|
||||
@@ -70,7 +70,7 @@ exports[`newline-before-arrow.js [oxc] format 1`] = `
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`newline-before-arrow.js [typescript] format 1`] = `
|
||||
exports[`newline-before-arrow.js format[typescript] 1`] = `
|
||||
"Unexpected keyword or identifier. (1:1)
|
||||
> 1 | async x
|
||||
| ^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`getter-generator.js [acorn] format 1`] = `
|
||||
exports[`getter-generator.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:9)
|
||||
1 | ({
|
||||
> 2 | get *iterator() { },
|
||||
@@ -10,7 +10,7 @@ exports[`getter-generator.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:8)"
|
||||
`;
|
||||
|
||||
exports[`getter-generator.js [babel] format 1`] = `
|
||||
exports[`getter-generator.js format[babel] 1`] = `
|
||||
"A getter cannot be a generator. (2:10)
|
||||
1 | ({
|
||||
> 2 | get *iterator() { },
|
||||
@@ -20,7 +20,7 @@ exports[`getter-generator.js [babel] format 1`] = `
|
||||
Cause: A getter cannot be a generator. (2:9)"
|
||||
`;
|
||||
|
||||
exports[`getter-generator.js [espree] format 1`] = `
|
||||
exports[`getter-generator.js format[espree] 1`] = `
|
||||
"Unexpected token * (2:9)
|
||||
1 | ({
|
||||
> 2 | get *iterator() { },
|
||||
@@ -30,7 +30,7 @@ exports[`getter-generator.js [espree] format 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`getter-generator.js [meriyah] format 1`] = `
|
||||
exports[`getter-generator.js format[meriyah] 1`] = `
|
||||
"A getter cannot be a generator (2:9)
|
||||
1 | ({
|
||||
> 2 | get *iterator() { },
|
||||
@@ -40,7 +40,7 @@ exports[`getter-generator.js [meriyah] format 1`] = `
|
||||
Cause: [2:8-2:9]: A getter cannot be a generator"
|
||||
`;
|
||||
|
||||
exports[`getter-with-parameter.js [acorn] format 1`] = `
|
||||
exports[`getter-with-parameter.js format[acorn] 1`] = `
|
||||
"getter should have no params (1:9)
|
||||
> 1 | ({ get x(a){} });
|
||||
| ^
|
||||
@@ -48,7 +48,7 @@ exports[`getter-with-parameter.js [acorn] format 1`] = `
|
||||
Cause: getter should have no params (1:8)"
|
||||
`;
|
||||
|
||||
exports[`getter-with-parameter.js [babel] format 1`] = `
|
||||
exports[`getter-with-parameter.js format[babel] 1`] = `
|
||||
"A 'get' accessor must not have any formal parameters. (1:4)
|
||||
> 1 | ({ get x(a){} });
|
||||
| ^
|
||||
@@ -56,7 +56,7 @@ exports[`getter-with-parameter.js [babel] format 1`] = `
|
||||
Cause: A 'get' accessor must not have any formal parameters. (1:3)"
|
||||
`;
|
||||
|
||||
exports[`getter-with-parameter.js [espree] format 1`] = `
|
||||
exports[`getter-with-parameter.js format[espree] 1`] = `
|
||||
"getter should have no params (1:9)
|
||||
> 1 | ({ get x(a){} });
|
||||
| ^
|
||||
@@ -64,7 +64,7 @@ exports[`getter-with-parameter.js [espree] format 1`] = `
|
||||
Cause: getter should have no params"
|
||||
`;
|
||||
|
||||
exports[`getter-with-parameter.js [meriyah] format 1`] = `
|
||||
exports[`getter-with-parameter.js format[meriyah] 1`] = `
|
||||
"Getter functions must have exactly no arguments (1:10)
|
||||
> 1 | ({ get x(a){} });
|
||||
| ^
|
||||
@@ -72,7 +72,7 @@ exports[`getter-with-parameter.js [meriyah] format 1`] = `
|
||||
Cause: [1:9-1:10]: Getter functions must have exactly no arguments"
|
||||
`;
|
||||
|
||||
exports[`setter-generator.js [acorn] format 1`] = `
|
||||
exports[`setter-generator.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:9)
|
||||
1 | ({
|
||||
> 2 | set *iterator(iter) { },
|
||||
@@ -82,7 +82,7 @@ exports[`setter-generator.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (2:8)"
|
||||
`;
|
||||
|
||||
exports[`setter-generator.js [babel] format 1`] = `
|
||||
exports[`setter-generator.js format[babel] 1`] = `
|
||||
"A setter cannot be a generator. (2:10)
|
||||
1 | ({
|
||||
> 2 | set *iterator(iter) { },
|
||||
@@ -92,7 +92,7 @@ exports[`setter-generator.js [babel] format 1`] = `
|
||||
Cause: A setter cannot be a generator. (2:9)"
|
||||
`;
|
||||
|
||||
exports[`setter-generator.js [espree] format 1`] = `
|
||||
exports[`setter-generator.js format[espree] 1`] = `
|
||||
"Unexpected token * (2:9)
|
||||
1 | ({
|
||||
> 2 | set *iterator(iter) { },
|
||||
@@ -102,7 +102,7 @@ exports[`setter-generator.js [espree] format 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`setter-generator.js [meriyah] format 1`] = `
|
||||
exports[`setter-generator.js format[meriyah] 1`] = `
|
||||
"A setter cannot be a generator (2:9)
|
||||
1 | ({
|
||||
> 2 | set *iterator(iter) { },
|
||||
@@ -112,7 +112,7 @@ exports[`setter-generator.js [meriyah] format 1`] = `
|
||||
Cause: [2:8-2:9]: A setter cannot be a generator"
|
||||
`;
|
||||
|
||||
exports[`setter-without-parameter.js [acorn] format 1`] = `
|
||||
exports[`setter-without-parameter.js format[acorn] 1`] = `
|
||||
"setter should have exactly one param (1:9)
|
||||
> 1 | ({ set x(){} });
|
||||
| ^
|
||||
@@ -120,7 +120,7 @@ exports[`setter-without-parameter.js [acorn] format 1`] = `
|
||||
Cause: setter should have exactly one param (1:8)"
|
||||
`;
|
||||
|
||||
exports[`setter-without-parameter.js [babel] format 1`] = `
|
||||
exports[`setter-without-parameter.js format[babel] 1`] = `
|
||||
"A 'set' accessor must have exactly one formal parameter. (1:4)
|
||||
> 1 | ({ set x(){} });
|
||||
| ^
|
||||
@@ -128,7 +128,7 @@ exports[`setter-without-parameter.js [babel] format 1`] = `
|
||||
Cause: A 'set' accessor must have exactly one formal parameter. (1:3)"
|
||||
`;
|
||||
|
||||
exports[`setter-without-parameter.js [espree] format 1`] = `
|
||||
exports[`setter-without-parameter.js format[espree] 1`] = `
|
||||
"setter should have exactly one param (1:9)
|
||||
> 1 | ({ set x(){} });
|
||||
| ^
|
||||
@@ -136,7 +136,7 @@ exports[`setter-without-parameter.js [espree] format 1`] = `
|
||||
Cause: setter should have exactly one param"
|
||||
`;
|
||||
|
||||
exports[`setter-without-parameter.js [meriyah] format 1`] = `
|
||||
exports[`setter-without-parameter.js format[meriyah] 1`] = `
|
||||
"Setter functions must have exactly one argument (1:10)
|
||||
> 1 | ({ set x(){} });
|
||||
| ^
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:21)
|
||||
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (1:21)
|
||||
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
|
||||
| ^
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (1:20)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:21)
|
||||
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (1:21)
|
||||
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
|
||||
| ^^
|
||||
Cause: [1:20-1:22]: Invalid optional chain from new expression"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:22)
|
||||
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (1:22)
|
||||
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
|
||||
| ^
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:22)
|
||||
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (1:22)
|
||||
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
|
||||
| ^^
|
||||
Cause: [1:21-1:23]: Invalid optional chain from new expression"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:22)
|
||||
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (1:22)
|
||||
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
|
||||
| ^
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:22)
|
||||
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (1:22)
|
||||
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
|
||||
| ^^
|
||||
Cause: [1:21-1:23]: Invalid optional chain from new expression"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:26)
|
||||
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (1:25)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (1:26)
|
||||
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
|
||||
| ^
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (1:25)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:26)
|
||||
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (1:26)
|
||||
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
|
||||
| ^^
|
||||
Cause: [1:25-1:27]: Invalid optional chain from new expression"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (4:9)
|
||||
2 | class Test {
|
||||
3 | }
|
||||
@@ -121,7 +121,7 @@ exports[`snippet: #4 [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (4:8)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (4:9)
|
||||
2 | class Test {
|
||||
3 | }
|
||||
@@ -130,7 +130,7 @@ exports[`snippet: #4 [babel] format 1`] = `
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (4:8)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (4:9)
|
||||
2 | class Test {
|
||||
3 | }
|
||||
@@ -139,7 +139,7 @@ exports[`snippet: #4 [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
exports[`snippet: #4 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (4:9)
|
||||
2 | class Test {
|
||||
3 | }
|
||||
@@ -148,28 +148,28 @@ exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
Cause: [4:8-4:10]: Invalid optional chain from new expression"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [acorn] format 1`] = `
|
||||
exports[`snippet: #5 format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:11)
|
||||
> 1 | new exists?.(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions (1:10)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel] format 1`] = `
|
||||
exports[`snippet: #5 format[babel] 1`] = `
|
||||
"Constructors in/after an Optional Chain are not allowed. (1:11)
|
||||
> 1 | new exists?.(); // undefined
|
||||
| ^
|
||||
Cause: Constructors in/after an Optional Chain are not allowed. (1:10)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [espree] format 1`] = `
|
||||
exports[`snippet: #5 format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in the callee of new expressions (1:11)
|
||||
> 1 | new exists?.(); // undefined
|
||||
| ^
|
||||
Cause: Optional chaining cannot appear in the callee of new expressions"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [meriyah] format 1`] = `
|
||||
exports[`snippet: #5 format[meriyah] 1`] = `
|
||||
"Invalid optional chain from new expression (1:11)
|
||||
> 1 | new exists?.(); // undefined
|
||||
| ^^
|
||||
|
||||
@@ -1,139 +1,139 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{a() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Unexpected token (1:1)
|
||||
> 1 | #{a() {}}
|
||||
| ^
|
||||
Cause: Unexpected token (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{a() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"'#' not followed by identifier (1:1)
|
||||
> 1 | #{a() {}}
|
||||
| ^
|
||||
Cause: [1:0-1:1]: '#' not followed by identifier"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{async b() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Unexpected token (1:1)
|
||||
> 1 | #{async b() {}}
|
||||
| ^
|
||||
Cause: Unexpected token (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{async b() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"'#' not followed by identifier (1:1)
|
||||
> 1 | #{async b() {}}
|
||||
| ^
|
||||
Cause: [1:0-1:1]: '#' not followed by identifier"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{get c() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Unexpected token (1:1)
|
||||
> 1 | #{get c() {}}
|
||||
| ^
|
||||
Cause: Unexpected token (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{get c() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
exports[`snippet: #2 format[meriyah] 1`] = `
|
||||
"'#' not followed by identifier (1:1)
|
||||
> 1 | #{get c() {}}
|
||||
| ^
|
||||
Cause: [1:0-1:1]: '#' not followed by identifier"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{set d(_) {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Unexpected token (1:1)
|
||||
> 1 | #{set d(_) {}}
|
||||
| ^
|
||||
Cause: Unexpected token (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{set d(_) {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
exports[`snippet: #3 format[meriyah] 1`] = `
|
||||
"'#' not followed by identifier (1:1)
|
||||
> 1 | #{set d(_) {}}
|
||||
| ^
|
||||
Cause: [1:0-1:1]: '#' not followed by identifier"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{*e() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Unexpected token (1:1)
|
||||
> 1 | #{*e() {}}
|
||||
| ^
|
||||
Cause: Unexpected token (1:0)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Unexpected character '{' (1:2)
|
||||
> 1 | #{*e() {}}
|
||||
| ^
|
||||
Cause: Unexpected character '{'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
exports[`snippet: #4 format[meriyah] 1`] = `
|
||||
"'#' not followed by identifier (1:1)
|
||||
> 1 | #{*e() {}}
|
||||
| ^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-flags.js [acorn] format 1`] = `
|
||||
exports[`invalid-flags.js format[acorn] 1`] = `
|
||||
"Invalid regular expression flag (1:2)
|
||||
> 1 | /a/ugv;
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ exports[`invalid-flags.js [acorn] format 1`] = `
|
||||
Cause: Invalid regular expression flag (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags.js [babel] format 1`] = `
|
||||
exports[`invalid-flags.js format[babel] 1`] = `
|
||||
"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:7)
|
||||
> 1 | /a/ugv;
|
||||
| ^
|
||||
@@ -16,7 +16,7 @@ exports[`invalid-flags.js [babel] format 1`] = `
|
||||
Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags.js [espree] format 1`] = `
|
||||
exports[`invalid-flags.js format[espree] 1`] = `
|
||||
"Invalid regular expression flag (1:2)
|
||||
> 1 | /a/ugv;
|
||||
| ^
|
||||
@@ -24,7 +24,7 @@ exports[`invalid-flags.js [espree] format 1`] = `
|
||||
Cause: Invalid regular expression flag"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags.js [meriyah] format 1`] = `
|
||||
exports[`invalid-flags.js format[meriyah] 1`] = `
|
||||
"Duplicate regular expression flag 'uv' (1:1)
|
||||
> 1 | /a/ugv;
|
||||
| ^^^^^
|
||||
@@ -32,7 +32,7 @@ exports[`invalid-flags.js [meriyah] format 1`] = `
|
||||
Cause: [1:0-1:5]: Duplicate regular expression flag 'uv'"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags2.js [acorn] format 1`] = `
|
||||
exports[`invalid-flags2.js format[acorn] 1`] = `
|
||||
"Invalid regular expression flag (1:2)
|
||||
> 1 | /a/vu;
|
||||
| ^
|
||||
@@ -40,7 +40,7 @@ exports[`invalid-flags2.js [acorn] format 1`] = `
|
||||
Cause: Invalid regular expression flag (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags2.js [babel] format 1`] = `
|
||||
exports[`invalid-flags2.js format[babel] 1`] = `
|
||||
"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)
|
||||
> 1 | /a/vu;
|
||||
| ^
|
||||
@@ -48,7 +48,7 @@ exports[`invalid-flags2.js [babel] format 1`] = `
|
||||
Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags2.js [espree] format 1`] = `
|
||||
exports[`invalid-flags2.js format[espree] 1`] = `
|
||||
"Invalid regular expression flag (1:2)
|
||||
> 1 | /a/vu;
|
||||
| ^
|
||||
@@ -56,7 +56,7 @@ exports[`invalid-flags2.js [espree] format 1`] = `
|
||||
Cause: Invalid regular expression flag"
|
||||
`;
|
||||
|
||||
exports[`invalid-flags2.js [meriyah] format 1`] = `
|
||||
exports[`invalid-flags2.js format[meriyah] 1`] = `
|
||||
"Duplicate regular expression flag 'vu' (1:1)
|
||||
> 1 | /a/vu;
|
||||
| ^^^^
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"The keyword 'interface' is reserved (1:7)
|
||||
> 1 | class interface {}
|
||||
| ^
|
||||
Cause: The keyword 'interface' is reserved (1:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [acorn] format 2`] = `
|
||||
exports[`snippet: #0 format[acorn] 2`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token (1:7)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"The keyword 'interface' is reserved (1:7)
|
||||
> 1 | class interface {}
|
||||
| ^
|
||||
Cause: The keyword 'interface' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 2`] = `
|
||||
exports[`snippet: #0 format[espree] 2`] = `
|
||||
"Unexpected token asyn\\u{63} (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token asyn\\u{63}"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Use of reserved word in strict mode (1:7)
|
||||
> 1 | class interface {}
|
||||
| ^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 2`] = `
|
||||
exports[`snippet: #0 format[flow] 2`] = `
|
||||
"Unexpected identifier, expected a declaration, statement or export specifiers (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"expected declaration in export (1:7)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^
|
||||
@@ -49,60 +49,60 @@ export asyn\\u{63} from "async";
|
||||
^~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Unexpected strict mode reserved word (1:7)
|
||||
> 1 | class interface {}
|
||||
| ^^^^^^^^^
|
||||
Cause: [1:6-1:15]: Unexpected strict mode reserved word"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 2`] = `
|
||||
exports[`snippet: #0 format[meriyah] 2`] = `
|
||||
"Unexpected token: 'reserved if strict' (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^^^^^^^^^^
|
||||
Cause: [1:7-1:17]: Unexpected token: 'reserved if strict'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc] 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc-ts] 1`] = `
|
||||
"Keywords cannot contain escape characters (1:8)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"Declaration or statement expected. (1:1)
|
||||
> 1 | export asyn\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Declaration or statement expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"The keyword 'interface' is reserved (1:8)
|
||||
> 1 | import interface from "foo";
|
||||
| ^
|
||||
Cause: The keyword 'interface' is reserved (1:7)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"The keyword 'interface' is reserved (1:8)
|
||||
> 1 | import interface from "foo";
|
||||
| ^
|
||||
Cause: The keyword 'interface' is reserved"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Use of reserved word in strict mode (1:8)
|
||||
> 1 | import interface from "foo";
|
||||
| ^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Unexpected strict mode reserved word (1:8)
|
||||
> 1 | import interface from "foo";
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-const.js [acorn] format 1`] = `
|
||||
exports[`invalid-const.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:10)
|
||||
> 1 | const foo;
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ exports[`invalid-const.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:9)"
|
||||
`;
|
||||
|
||||
exports[`invalid-const.js [espree] format 1`] = `
|
||||
exports[`invalid-const.js format[espree] 1`] = `
|
||||
"Unexpected token ; (1:10)
|
||||
> 1 | const foo;
|
||||
| ^
|
||||
@@ -16,7 +16,7 @@ exports[`invalid-const.js [espree] format 1`] = `
|
||||
Cause: Unexpected token ;"
|
||||
`;
|
||||
|
||||
exports[`invalid-const.js [meriyah] format 1`] = `
|
||||
exports[`invalid-const.js format[meriyah] 1`] = `
|
||||
"Missing initializer in const declaration (1:10)
|
||||
> 1 | const foo;
|
||||
| ^
|
||||
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`arrows-bind.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: Unexpected token (1:8)"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js [espree] format 1`] = `
|
||||
"Unexpected token : (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js [meriyah] format 1`] = `
|
||||
"Expected ')' (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: [1:8-1:9]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js [oxc] format 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -56,3 +17,42 @@ a::((b) => c);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: Unexpected token (1:8)"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js format[espree] 1`] = `
|
||||
"Unexpected token : (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js format[meriyah] 1`] = `
|
||||
"Expected ')' (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |
|
||||
Cause: [1:8-1:9]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`arrows-bind.js format[oxc] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (1:9)
|
||||
> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
| ^
|
||||
2 | (a => b)::c;
|
||||
3 | a::(b => c);
|
||||
4 |"
|
||||
`;
|
||||
@@ -1,18 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`binaryish.js [hermes] format 1`] = `
|
||||
"invalid assignment left-hand side (6:0)
|
||||
4 | descriptionLines;
|
||||
5 |
|
||||
> 6 | computedDescriptionLines = (focused &&
|
||||
7 | !loading &&
|
||||
8 | descriptionLinesFocused) ||
|
||||
9 | descriptionLines;
|
||||
Cause: invalid assignment left-hand side (6:0)
|
||||
computedDescriptionLines = (focused &&
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`binaryish.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -41,6 +28,19 @@ computedDescriptionLines =
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`binaryish.js format[hermes] 1`] = `
|
||||
"invalid assignment left-hand side (6:0)
|
||||
4 | descriptionLines;
|
||||
5 |
|
||||
> 6 | computedDescriptionLines = (focused &&
|
||||
7 | !loading &&
|
||||
8 | descriptionLinesFocused) ||
|
||||
9 | descriptionLines;
|
||||
Cause: invalid assignment left-hand side (6:0)
|
||||
computedDescriptionLines = (focused &&
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`call-with-template.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`async-do-expressions.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:7)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: Unexpected token (1:6)"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js [espree] format 1`] = `
|
||||
"Unexpected token do (1:7)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'do' (1:7)
|
||||
> 1 | async do {
|
||||
| ^^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: [1:6-1:8]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js [oxc] format 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -94,3 +55,42 @@ let x = async do {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:7)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: Unexpected token (1:6)"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js format[espree] 1`] = `
|
||||
"Unexpected token do (1:7)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'do' (1:7)
|
||||
> 1 | async do {
|
||||
| ^^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |
|
||||
Cause: [1:6-1:8]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`async-do-expressions.js format[oxc] 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
|
||||
> 1 | async do {
|
||||
| ^
|
||||
2 | 1;
|
||||
3 | };
|
||||
4 |"
|
||||
`;
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`null-arguments-item.js [__babel_estree] format 1`] = `
|
||||
exports[`null-arguments-item.js format[__babel_estree] 1`] = `
|
||||
"Unexpected token ','. (1:12)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
@@ -10,7 +10,7 @@ exports[`null-arguments-item.js [__babel_estree] format 1`] = `
|
||||
Cause: Unexpected token ','. (1:11)"
|
||||
`;
|
||||
|
||||
exports[`null-arguments-item.js [acorn] format 1`] = `
|
||||
exports[`null-arguments-item.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:11)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
@@ -20,7 +20,7 @@ exports[`null-arguments-item.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:10)"
|
||||
`;
|
||||
|
||||
exports[`null-arguments-item.js [babel] format 1`] = `
|
||||
exports[`null-arguments-item.js format[babel] 1`] = `
|
||||
"Unexpected token ','. (1:12)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
@@ -30,7 +30,7 @@ exports[`null-arguments-item.js [babel] format 1`] = `
|
||||
Cause: Unexpected token ','. (1:11)"
|
||||
`;
|
||||
|
||||
exports[`null-arguments-item.js [espree] format 1`] = `
|
||||
exports[`null-arguments-item.js format[espree] 1`] = `
|
||||
"Unexpected token , (1:11)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
@@ -40,7 +40,7 @@ exports[`null-arguments-item.js [espree] format 1`] = `
|
||||
Cause: Unexpected token ,"
|
||||
`;
|
||||
|
||||
exports[`null-arguments-item.js [meriyah] format 1`] = `
|
||||
exports[`null-arguments-item.js format[meriyah] 1`] = `
|
||||
"Unexpected token: ',' (1:11)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
@@ -50,7 +50,7 @@ exports[`null-arguments-item.js [meriyah] format 1`] = `
|
||||
Cause: [1:10-1:11]: Unexpected token: ','"
|
||||
`;
|
||||
|
||||
exports[`null-arguments-item.js [oxc] format 1`] = `
|
||||
exports[`null-arguments-item.js format[oxc] 1`] = `
|
||||
"Unexpected token (1:11)
|
||||
> 1 | foor('a', , 'b');
|
||||
| ^
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`optional-chaining.js [espree] format 1`] = `
|
||||
"Private field '#x' must be declared in an enclosing class (3:13)
|
||||
1 | // https://github.com/babel/babel/pull/11669
|
||||
2 |
|
||||
> 3 | delete obj?.#x.a
|
||||
| ^
|
||||
4 |
|
||||
Cause: Private field '#x' must be declared in an enclosing class"
|
||||
`;
|
||||
|
||||
exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = `
|
||||
"Private field '#x' must be declared in an enclosing class (3:13)
|
||||
1 | // https://github.com/babel/babel/pull/11669
|
||||
2 |
|
||||
> 3 | delete obj?.#x.a
|
||||
| ^
|
||||
4 |
|
||||
Cause: Private field '#x' must be declared in an enclosing class"
|
||||
`;
|
||||
|
||||
exports[`optional-chaining.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -39,6 +19,16 @@ delete obj?.#x.a
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`optional-chaining.js - {"semi":false} format[espree] 1`] = `
|
||||
"Private field '#x' must be declared in an enclosing class (3:13)
|
||||
1 | // https://github.com/babel/babel/pull/11669
|
||||
2 |
|
||||
> 3 | delete obj?.#x.a
|
||||
| ^
|
||||
4 |
|
||||
Cause: Private field '#x' must be declared in an enclosing class"
|
||||
`;
|
||||
|
||||
exports[`optional-chaining.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -57,6 +47,16 @@ delete obj?.#x.a;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`optional-chaining.js format[espree] 1`] = `
|
||||
"Private field '#x' must be declared in an enclosing class (3:13)
|
||||
1 | // https://github.com/babel/babel/pull/11669
|
||||
2 |
|
||||
> 3 | delete obj?.#x.a
|
||||
| ^
|
||||
4 |
|
||||
Cause: Private field '#x' must be declared in an enclosing class"
|
||||
`;
|
||||
|
||||
exports[`private_fields.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`example.js [acorn] format 1`] = `
|
||||
"super() call outside constructor of a subclass (1:1)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: super() call outside constructor of a subclass (1:0)"
|
||||
`;
|
||||
|
||||
exports[`example.js [espree] format 1`] = `
|
||||
"'super' keyword outside a method (1:1)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'super' keyword outside a method"
|
||||
`;
|
||||
|
||||
exports[`example.js [meriyah] format 1`] = `
|
||||
"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:5-1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass"
|
||||
`;
|
||||
|
||||
exports[`example.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript"]
|
||||
@@ -37,3 +13,27 @@ super();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`example.js format[acorn] 1`] = `
|
||||
"super() call outside constructor of a subclass (1:1)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: super() call outside constructor of a subclass (1:0)"
|
||||
`;
|
||||
|
||||
exports[`example.js format[espree] 1`] = `
|
||||
"'super' keyword outside a method (1:1)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'super' keyword outside a method"
|
||||
`;
|
||||
|
||||
exports[`example.js format[meriyah] 1`] = `
|
||||
"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6)
|
||||
> 1 | super();
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:5-1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass"
|
||||
`;
|
||||
@@ -1,52 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`pipeline_own_line.js [acorn] format 1`] = `
|
||||
"Unexpected token (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: Unexpected token (4:2)"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js [espree] format 1`] = `
|
||||
"Unexpected token > (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '>' (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: [4:2-4:3]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js [oxc] format 1`] = `
|
||||
"Unexpected token (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder("
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -134,3 +87,50 @@ bifornCringerMoshedPerplexSawder[
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js format[acorn] 1`] = `
|
||||
"Unexpected token (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: Unexpected token (4:2)"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js format[espree] 1`] = `
|
||||
"Unexpected token > (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '>' (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder(
|
||||
Cause: [4:2-4:3]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`pipeline_own_line.js format[oxc] 1`] = `
|
||||
"Unexpected token (4:3)
|
||||
2 | 0
|
||||
3 | // Comment
|
||||
> 4 | |> x
|
||||
| ^
|
||||
5 | }
|
||||
6 |
|
||||
7 | bifornCringerMoshedPerplexSawder("
|
||||
`;
|
||||
@@ -1,45 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`basic.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`basic.js [espree] format 1`] = `
|
||||
"Unexpected token bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`basic.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`basic.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`basic.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -59,6 +19,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`basic.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`basic.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`basic.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -77,48 +57,24 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
exports[`basic.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`comments.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`comments.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`comments.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@'"
|
||||
exports[`basic.js format[espree] 1`] = `
|
||||
"Unexpected token bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`comments.js - {"semi":false} format 1`] = `
|
||||
@@ -144,6 +100,28 @@ class A {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`comments.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`comments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -166,44 +144,26 @@ class A {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`computed.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
exports[`comments.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`computed.js [espree] format 1`] = `
|
||||
"Unexpected token [ (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`computed.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`computed.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token [ (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
exports[`comments.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class A {
|
||||
> 2 | @dec()
|
||||
| ^
|
||||
3 | // comment
|
||||
4 | accessor b;
|
||||
5 | }
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`computed.js - {"semi":false} format 1`] = `
|
||||
@@ -225,6 +185,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`computed.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`computed.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token [ (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`computed.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -243,6 +223,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`computed.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`computed.js format[espree] 1`] = `
|
||||
"Unexpected token [ (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`not-accessor-method.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -317,46 +317,6 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`private.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`private.js [espree] format 1`] = `
|
||||
"Unexpected token #bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`private.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`private.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token #bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`private.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -376,6 +336,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`private.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`private.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token #bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`private.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -394,44 +374,24 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
exports[`private.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`static.js [espree] format 1`] = `
|
||||
"Unexpected token bar (2:19)
|
||||
exports[`private.js format[espree] 1`] = `
|
||||
"Unexpected token #bar (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
> 2 | accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`static.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`static.js - {"semi":false} format 1`] = `
|
||||
@@ -453,6 +413,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`static.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -471,44 +451,24 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-computed.js [acorn] format 1`] = `
|
||||
exports[`static.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-computed.js [espree] format 1`] = `
|
||||
"Unexpected token [ (2:19)
|
||||
exports[`static.js format[espree] 1`] = `
|
||||
"Unexpected token bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
> 2 | static accessor bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`static-computed.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-computed.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token [ (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
Cause: Unexpected token bar"
|
||||
`;
|
||||
|
||||
exports[`static-computed.js - {"semi":false} format 1`] = `
|
||||
@@ -530,6 +490,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-computed.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-computed.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token [ (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`static-computed.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -548,44 +528,24 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-private.js [acorn] format 1`] = `
|
||||
exports[`static-computed.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-private.js [espree] format 1`] = `
|
||||
"Unexpected token #bar (2:19)
|
||||
exports[`static-computed.js format[espree] 1`] = `
|
||||
"Unexpected token [ (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
> 2 | static accessor ["bar"];
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`static-private.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-private.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token #bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
Cause: Unexpected token ["
|
||||
`;
|
||||
|
||||
exports[`static-private.js - {"semi":false} format 1`] = `
|
||||
@@ -607,6 +567,26 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-private.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`static-private.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token #bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`static-private.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -625,48 +605,24 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
exports[`static-private.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token (2:18)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js [espree] format 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
exports[`static-private.js format[espree] 1`] = `
|
||||
"Unexpected token #bar (2:19)
|
||||
1 | class Foo {
|
||||
> 2 | static accessor #bar;
|
||||
| ^
|
||||
3 | }
|
||||
4 |
|
||||
Cause: Unexpected token #bar"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js - {"semi":false} format 1`] = `
|
||||
@@ -690,6 +646,28 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-1.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -710,47 +688,25 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js [acorn] format 1`] = `
|
||||
exports[`with-semicolon-1.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js [espree] format 1`] = `
|
||||
exports[`with-semicolon-1.js format[espree] 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
3 | [foo]() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
|
||||
@@ -775,6 +731,28 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "babel-flow"]
|
||||
@@ -794,3 +772,25 @@ class C {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`with-semicolon-2.js format[espree] 1`] = `
|
||||
"Unexpected token clicked (2:12)
|
||||
1 | class C {
|
||||
> 2 | accessor clicked = "value";
|
||||
| ^
|
||||
3 | *foo() {}
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token clicked"
|
||||
`;
|
||||
@@ -1,25 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`after_export.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:8)
|
||||
> 1 | export @decorator class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | export default @decorator class {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`after_export.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:8)
|
||||
> 1 | export @decorator class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | export default @decorator class {}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`after_export.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -42,23 +22,23 @@ class {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`before_export.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @decorator
|
||||
| ^
|
||||
2 | export class Foo {}
|
||||
3 |
|
||||
4 | @decorator
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
exports[`after_export.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:8)
|
||||
> 1 | export @decorator class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | export default @decorator class {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`before_export.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @decorator
|
||||
| ^
|
||||
2 | export class Foo {}
|
||||
3 |
|
||||
4 | @decorator
|
||||
exports[`after_export.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:8)
|
||||
> 1 | export @decorator class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | export default @decorator class {}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
@@ -83,3 +63,23 @@ export default class {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`before_export.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @decorator
|
||||
| ^
|
||||
2 | export class Foo {}
|
||||
3 |
|
||||
4 | @decorator
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
`;
|
||||
|
||||
exports[`before_export.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @decorator
|
||||
| ^
|
||||
2 | export class Foo {}
|
||||
3 |
|
||||
4 | @decorator
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
@@ -1,47 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`classes.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @deco class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
`;
|
||||
|
||||
exports[`classes.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @deco class Foo {}
|
||||
| ^
|
||||
2 |
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`classes.js [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (7:13)
|
||||
5 | @deco export default class Baz {}
|
||||
6 |
|
||||
> 7 | const foo = @deco class {
|
||||
| ^
|
||||
8 | //
|
||||
9 | };
|
||||
10 |"
|
||||
`;
|
||||
|
||||
exports[`classes.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:0)
|
||||
> 1 | @deco class Foo {}
|
||||
2 |
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:0)
|
||||
@deco class Foo {}
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`classes.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -89,40 +47,45 @@ const bar =
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | var x = 100
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
exports[`classes.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @deco class Foo {}
|
||||
| ^
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
Cause: Unexpected character '@' (3:0)"
|
||||
2 |
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
`;
|
||||
|
||||
exports[`comments.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | var x = 100
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
exports[`classes.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @deco class Foo {}
|
||||
| ^
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
2 |
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`comments.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | var x = 100
|
||||
exports[`classes.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (7:13)
|
||||
5 | @deco export default class Baz {}
|
||||
6 |
|
||||
> 7 | const foo = @deco class {
|
||||
| ^
|
||||
8 | //
|
||||
9 | };
|
||||
10 |"
|
||||
`;
|
||||
|
||||
exports[`classes.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:0)
|
||||
> 1 | @deco class Foo {}
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@Hello({
|
||||
3 | @deco export class Bar {}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:0)
|
||||
@deco class Foo {}
|
||||
^"
|
||||
`;
|
||||
|
||||
@@ -207,42 +170,41 @@ class Something {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (3:5)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
Cause: Unexpected character '@' (3:4)"
|
||||
exports[`comments.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | var x = 100
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
| ^
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
Cause: Unexpected character '@' (3:0)"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (3:5)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
exports[`comments.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | var x = 100
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
| ^
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:4)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
Cause: unrecognized character '@' (3:4)
|
||||
@(decorator)
|
||||
^"
|
||||
exports[`comments.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | var x = 100
|
||||
2 |
|
||||
> 3 | @Hello({
|
||||
4 | a: 'a', // Comment is in the wrong place
|
||||
5 | // test
|
||||
6 | b: '2'
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@Hello({
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js format 1`] = `
|
||||
@@ -389,42 +351,42 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`methods.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
Cause: Unexpected character '@' (3:2)"
|
||||
exports[`member-expression.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:5)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
Cause: Unexpected character '@' (3:4)"
|
||||
`;
|
||||
|
||||
exports[`methods.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
exports[`member-expression.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:5)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`methods.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:2)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
Cause: unrecognized character '@' (3:2)
|
||||
@foo("hello")
|
||||
^"
|
||||
exports[`member-expression.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:4)
|
||||
1 | [
|
||||
2 | class {
|
||||
> 3 | @(decorator)
|
||||
| ^
|
||||
4 | method() {}
|
||||
5 | },
|
||||
6 | class {
|
||||
Cause: unrecognized character '@' (3:4)
|
||||
@(decorator)
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`methods.js format 1`] = `
|
||||
@@ -459,41 +421,42 @@ class Yo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mixed.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @foo
|
||||
| ^
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
Cause: Unexpected character '@' (3:0)"
|
||||
exports[`methods.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
Cause: Unexpected character '@' (3:2)"
|
||||
`;
|
||||
|
||||
exports[`mixed.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @foo
|
||||
| ^
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
exports[`methods.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`mixed.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @foo
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@foo
|
||||
^"
|
||||
exports[`methods.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:2)
|
||||
1 |
|
||||
2 | class Yo {
|
||||
> 3 | @foo("hello")
|
||||
| ^
|
||||
4 | async plop() {}
|
||||
5 |
|
||||
6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
|
||||
Cause: unrecognized character '@' (3:2)
|
||||
@foo("hello")
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`mixed.js format 1`] = `
|
||||
@@ -522,40 +485,40 @@ export default class MyComponent {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mobx.js [acorn] format 1`] = `
|
||||
exports[`mixed.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | import {observable} from "mobx";
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
> 3 | @foo
|
||||
| ^
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
Cause: Unexpected character '@' (3:0)"
|
||||
`;
|
||||
|
||||
exports[`mobx.js [espree] format 1`] = `
|
||||
exports[`mixed.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | import {observable} from "mobx";
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
> 3 | @foo
|
||||
| ^
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`mobx.js [hermes] format 1`] = `
|
||||
exports[`mixed.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | import {observable} from "mobx";
|
||||
1 | // https://github.com/prettier/prettier/issues/6747
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
> 3 | @foo
|
||||
4 | export default class MyComponent {
|
||||
5 | @task
|
||||
6 | *foo() {
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@observer class OrderLine {
|
||||
@foo
|
||||
^"
|
||||
`;
|
||||
|
||||
@@ -651,39 +614,41 @@ class OrderLine {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multiline.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
exports[`mobx.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | import {observable} from "mobx";
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
| ^
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
Cause: Unexpected character '@' (3:0)"
|
||||
`;
|
||||
|
||||
exports[`multiline.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
exports[`mobx.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:1)
|
||||
1 | import {observable} from "mobx";
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
| ^
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`multiline.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
Cause: unrecognized character '@' (2:2)
|
||||
@deco([
|
||||
^"
|
||||
exports[`mobx.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:0)
|
||||
1 | import {observable} from "mobx";
|
||||
2 |
|
||||
> 3 | @observer class OrderLine {
|
||||
4 | @observable price = 0;
|
||||
5 | @observable amount = 1;
|
||||
6 |
|
||||
Cause: unrecognized character '@' (3:0)
|
||||
@observer class OrderLine {
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`multiline.js format 1`] = `
|
||||
@@ -725,38 +690,38 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multiple.js [acorn] format 1`] = `
|
||||
exports[`multiline.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`multiple.js [espree] format 1`] = `
|
||||
exports[`multiline.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`multiple.js [hermes] format 1`] = `
|
||||
exports[`multiline.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (2:2)
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
1 | class Foo {
|
||||
> 2 | @deco([
|
||||
| ^
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
3 | foo,
|
||||
4 | bar
|
||||
5 | ]) prop = value;
|
||||
Cause: unrecognized character '@' (2:2)
|
||||
@readonly
|
||||
@deco([
|
||||
^"
|
||||
`;
|
||||
|
||||
@@ -809,38 +774,38 @@ const foo = class {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parens.js [acorn] format 1`] = `
|
||||
exports[`multiple.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`parens.js [espree] format 1`] = `
|
||||
exports[`multiple.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`parens.js [hermes] format 1`] = `
|
||||
exports[`multiple.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (2:2)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
1 | const dog = class {
|
||||
> 2 | @readonly
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
3 | @nonenumerable
|
||||
4 | @doubledValue
|
||||
5 | legs = 4;
|
||||
Cause: unrecognized character '@' (2:2)
|
||||
@(computed().volatile())
|
||||
@readonly
|
||||
^"
|
||||
`;
|
||||
|
||||
@@ -864,35 +829,39 @@ class X {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`redux.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
| ^
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
exports[`parens.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected character '@' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`redux.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
| ^
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
exports[`parens.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:3)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`redux.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:0)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
Cause: unrecognized character '@' (1:0)
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
^"
|
||||
exports[`parens.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (2:2)
|
||||
1 | class X {
|
||||
> 2 | @(computed().volatile())
|
||||
| ^
|
||||
3 | x
|
||||
4 | }
|
||||
5 |
|
||||
Cause: unrecognized character '@' (2:2)
|
||||
@(computed().volatile())
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`redux.js format 1`] = `
|
||||
@@ -916,3 +885,34 @@ export class Home extends React.Component {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`redux.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
| ^
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
Cause: Unexpected character '@' (1:0)"
|
||||
`;
|
||||
|
||||
exports[`redux.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:1)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
| ^
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`redux.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:0)
|
||||
> 1 | @connect(mapStateToProps, mapDispatchToProps)
|
||||
2 | export class MyApp extends React.Component {}
|
||||
3 |
|
||||
4 | @connect(state => ({ todos: state.todos }))
|
||||
Cause: unrecognized character '@' (1:0)
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
^"
|
||||
`;
|
||||
@@ -1,79 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`arguments.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`arguments.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`arguments.js [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`arguments.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
console.log(@deco class Foo {})
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
console.log(@deco class Foo {})
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -97,6 +23,43 @@ console.log(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`arguments.js - {"semi":false} format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
console.log(@deco class Foo {})
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`arguments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -119,85 +82,40 @@ console.log(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`class-expression.js [acorn] format 1`] = `
|
||||
exports[`arguments.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js [espree] format 1`] = `
|
||||
exports[`arguments.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js [flow] format 1`] = `
|
||||
exports[`arguments.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});"
|
||||
2 | console.log(@deco class {})
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js [hermes] format 1`] = `
|
||||
exports[`arguments.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
> 1 | console.log(@deco class Foo {})
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
2 | console.log(@deco class {})
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
const a1 = (@deco class Foo {});
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
const a1 = (@deco class Foo {});
|
||||
console.log(@deco class Foo {})
|
||||
^"
|
||||
`;
|
||||
|
||||
@@ -259,6 +177,47 @@ class Foo {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js - {"semi":false} format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
const a1 = (@deco class Foo {});
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`class-expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -316,78 +275,45 @@ class Foo {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
exports[`class-expression.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:1)"
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@' (1:12)"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
exports[`class-expression.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
4 | (@deco class Foo {});
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:1)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
exports[`class-expression.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:13)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:1)
|
||||
(@deco class Foo {}).name;
|
||||
^"
|
||||
4 | (@deco class Foo {});"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
exports[`class-expression.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:12)
|
||||
> 1 | const a1 = (@deco class Foo {});
|
||||
| ^
|
||||
2 | const a2 = (@deco class {});
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:1)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:1)
|
||||
(@deco class Foo {}).name;
|
||||
^"
|
||||
4 | (@deco class Foo {});
|
||||
Cause: unrecognized character '@' (1:12)
|
||||
const a1 = (@deco class Foo {});
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} format 1`] = `
|
||||
@@ -413,6 +339,43 @@ semi: false
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js - {"semi":false} format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:1)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:1)
|
||||
(@deco class Foo {}).name;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`member-expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -435,86 +398,41 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`super-class.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:19)"
|
||||
exports[`member-expression.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: Unexpected character '@' (1:1)"
|
||||
`;
|
||||
|
||||
exports[`super-class.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
exports[`member-expression.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`super-class.js [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |"
|
||||
exports[`member-expression.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:2)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`super-class.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:19)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:19)
|
||||
class Foo extends (@deco class Foo {}){}
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:19)"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} [hermes] format 1`] = `
|
||||
"unrecognized character '@' (1:19)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:19)
|
||||
class Foo extends (@deco class Foo {}){}
|
||||
^"
|
||||
exports[`member-expression.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:1)
|
||||
> 1 | (@deco class Foo {}).name;
|
||||
| ^
|
||||
2 | (@deco class {}).name;
|
||||
3 |
|
||||
Cause: unrecognized character '@' (1:1)
|
||||
(@deco class Foo {}).name;
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} format 1`] = `
|
||||
@@ -542,6 +460,47 @@ class Foo extends (
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:19)"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`super-class.js - {"semi":false} format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:19)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:19)
|
||||
class Foo extends (@deco class Foo {}){}
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`super-class.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -565,3 +524,44 @@ class Foo extends (
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`super-class.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (1:19)"
|
||||
`;
|
||||
|
||||
exports[`super-class.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`super-class.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (1:20)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`super-class.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (1:19)
|
||||
> 1 | class Foo extends (@deco class Foo {}){}
|
||||
| ^
|
||||
2 |
|
||||
3 | class Foo extends (@deco class {}){}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (1:19)
|
||||
class Foo extends (@deco class Foo {}){}
|
||||
^"
|
||||
`;
|
||||
@@ -1,29 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`dynamic-import.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^^^^^
|
||||
2 |
|
||||
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -38,25 +14,25 @@ import.defer("foo");
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js [acorn] format 1`] = `
|
||||
exports[`dynamic-import.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js [espree] format 1`] = `
|
||||
exports[`dynamic-import.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js [meriyah] format 1`] = `
|
||||
exports[`dynamic-import.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
> 1 | import.defer("foo");
|
||||
| ^^^^^
|
||||
2 |
|
||||
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
@@ -76,28 +52,28 @@ import.defer("x", { with: { attr: "val" } });
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
exports[`dynamic-import-attributes-expression.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [espree] format 1`] = `
|
||||
"Unexpected token * (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
exports[`dynamic-import-attributes-expression.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token *"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [meriyah] format 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
exports[`dynamic-import-attributes-expression.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^^^^^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format 1`] = `
|
||||
@@ -114,25 +90,25 @@ import defer * as ns from "x";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js [acorn] format 1`] = `
|
||||
exports[`import-defer.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js [espree] format 1`] = `
|
||||
exports[`import-defer.js format[espree] 1`] = `
|
||||
"Unexpected token * (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js [meriyah] format 1`] = `
|
||||
exports[`import-defer.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
@@ -152,7 +128,31 @@ import defer * as ns from "x" with { attr: "val" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-default.js [__babel_estree] format 1`] = `
|
||||
exports[`import-defer-attributes-declaration.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[espree] 1`] = `
|
||||
"Unexpected token * (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[__babel_estree] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
@@ -160,7 +160,7 @@ exports[`no-default.js [__babel_estree] format 1`] = `
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js [acorn] format 1`] = `
|
||||
exports[`no-default.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
@@ -168,7 +168,7 @@ exports[`no-default.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js [babel] format 1`] = `
|
||||
exports[`no-default.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
@@ -176,7 +176,7 @@ exports[`no-default.js [babel] format 1`] = `
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js [espree] format 1`] = `
|
||||
exports[`no-default.js format[espree] 1`] = `
|
||||
"Unexpected token x (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
@@ -184,7 +184,7 @@ exports[`no-default.js [espree] format 1`] = `
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`no-default.js [meriyah] format 1`] = `
|
||||
exports[`no-default.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
@@ -192,14 +192,14 @@ exports[`no-default.js [meriyah] format 1`] = `
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-default.js [oxc] format 1`] = `
|
||||
exports[`no-default.js format[oxc] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [__babel_estree] format 1`] = `
|
||||
exports[`no-named.js format[__babel_estree] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
@@ -207,7 +207,7 @@ exports[`no-named.js [__babel_estree] format 1`] = `
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [acorn] format 1`] = `
|
||||
exports[`no-named.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
@@ -215,7 +215,7 @@ exports[`no-named.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [babel] format 1`] = `
|
||||
exports[`no-named.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
@@ -223,7 +223,7 @@ exports[`no-named.js [babel] format 1`] = `
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [espree] format 1`] = `
|
||||
exports[`no-named.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
@@ -231,7 +231,7 @@ exports[`no-named.js [espree] format 1`] = `
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [meriyah] format 1`] = `
|
||||
exports[`no-named.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
@@ -239,7 +239,7 @@ exports[`no-named.js [meriyah] format 1`] = `
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [oxc] format 1`] = `
|
||||
exports[`no-named.js format[oxc] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,48 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`arrow-params.js [acorn] format 1`] = `
|
||||
"Unexpected token (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (3:10)"
|
||||
`;
|
||||
|
||||
exports[`arrow-params.js [espree] format 1`] = `
|
||||
"Unexpected token #x (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`arrow-params.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: [3:10-3:11]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`arrow-params.js [oxc] format 1`] = `
|
||||
"Unexpected token (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^^
|
||||
4 | }
|
||||
5 |"
|
||||
`;
|
||||
|
||||
exports[`arrow-params.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "babel-flow", "babel-ts"]
|
||||
@@ -63,51 +20,47 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`assignment.js [acorn] format 1`] = `
|
||||
"Unexpected token (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token (5:7)"
|
||||
exports[`arrow-params.js format[acorn] 1`] = `
|
||||
"Unexpected token (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (3:10)"
|
||||
`;
|
||||
|
||||
exports[`assignment.js [espree] format 1`] = `
|
||||
"Unexpected token #x (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
exports[`arrow-params.js format[espree] 1`] = `
|
||||
"Unexpected token #x (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`assignment.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: [5:7-5:8]: Unexpected token: 'PrivateField'"
|
||||
exports[`arrow-params.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: [3:10-3:11]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`assignment.js [oxc] format 1`] = `
|
||||
"Unexpected token (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |"
|
||||
exports[`arrow-params.js format[oxc] 1`] = `
|
||||
"Unexpected token (3:11)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = ({ #x: x }) => {}
|
||||
| ^^
|
||||
4 | }
|
||||
5 |"
|
||||
`;
|
||||
|
||||
exports[`assignment.js format 1`] = `
|
||||
@@ -136,47 +89,51 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async-arrow-params.js [acorn] format 1`] = `
|
||||
"Unexpected token (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (3:16)"
|
||||
exports[`assignment.js format[acorn] 1`] = `
|
||||
"Unexpected token (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token (5:7)"
|
||||
`;
|
||||
|
||||
exports[`async-arrow-params.js [espree] format 1`] = `
|
||||
"Unexpected token #x (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
exports[`assignment.js format[espree] 1`] = `
|
||||
"Unexpected token #x (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`async-arrow-params.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: [3:16-3:17]: Unexpected token: 'PrivateField'"
|
||||
exports[`assignment.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: [5:7-5:8]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`async-arrow-params.js [oxc] format 1`] = `
|
||||
"Unexpected token (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^^
|
||||
4 | }
|
||||
5 |"
|
||||
exports[`assignment.js format[oxc] 1`] = `
|
||||
"Unexpected token (5:8)
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | ({ #x: x } = this);
|
||||
| ^^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |"
|
||||
`;
|
||||
|
||||
exports[`async-arrow-params.js format 1`] = `
|
||||
@@ -199,51 +156,47 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bindings.js [acorn] format 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
exports[`async-arrow-params.js format[acorn] 1`] = `
|
||||
"Unexpected token (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token (4:11)"
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token (3:16)"
|
||||
`;
|
||||
|
||||
exports[`bindings.js [espree] format 1`] = `
|
||||
"Unexpected token #x (4:12)
|
||||
exports[`async-arrow-params.js format[espree] 1`] = `
|
||||
"Unexpected token #x (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`bindings.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:12)
|
||||
exports[`async-arrow-params.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: [3:16-3:17]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`bindings.js [oxc] format 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
exports[`async-arrow-params.js format[oxc] 1`] = `
|
||||
"Unexpected token (3:17)
|
||||
1 | class C {
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |"
|
||||
> 3 | #p = async ({ #x: x }) => {}
|
||||
| ^^
|
||||
4 | }
|
||||
5 |"
|
||||
`;
|
||||
|
||||
exports[`bindings.js format 1`] = `
|
||||
@@ -270,51 +223,51 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`for-lhs.js [acorn] format 1`] = `
|
||||
"Unexpected token (5:11)
|
||||
exports[`bindings.js format[acorn] 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token (5:10)"
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token (4:11)"
|
||||
`;
|
||||
|
||||
exports[`for-lhs.js [espree] format 1`] = `
|
||||
"Unexpected token #x (5:11)
|
||||
exports[`bindings.js format[espree] 1`] = `
|
||||
"Unexpected token #x (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`for-lhs.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (5:11)
|
||||
exports[`bindings.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: [5:10-5:11]: Unexpected token: 'PrivateField'"
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`for-lhs.js [oxc] format 1`] = `
|
||||
"Unexpected token (5:11)
|
||||
exports[`bindings.js format[oxc] 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |"
|
||||
> 4 | const {#x: x} = this;
|
||||
| ^^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |"
|
||||
`;
|
||||
|
||||
exports[`for-lhs.js format 1`] = `
|
||||
@@ -343,51 +296,51 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`nested-bindings.js [acorn] format 1`] = `
|
||||
"Unexpected token (4:17)
|
||||
2 | #x = 1;
|
||||
exports[`for-lhs.js format[acorn] 1`] = `
|
||||
"Unexpected token (5:11)
|
||||
3 | m() {
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token (4:16)"
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token (5:10)"
|
||||
`;
|
||||
|
||||
exports[`nested-bindings.js [espree] format 1`] = `
|
||||
"Unexpected token #x (4:17)
|
||||
2 | #x = 1;
|
||||
exports[`for-lhs.js format[espree] 1`] = `
|
||||
"Unexpected token #x (5:11)
|
||||
3 | m() {
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`nested-bindings.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:17)
|
||||
2 | #x = 1;
|
||||
exports[`for-lhs.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (5:11)
|
||||
3 | m() {
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: [4:16-4:17]: Unexpected token: 'PrivateField'"
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |
|
||||
Cause: [5:10-5:11]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`nested-bindings.js [oxc] format 1`] = `
|
||||
"Unexpected token (4:17)
|
||||
2 | #x = 1;
|
||||
exports[`for-lhs.js format[oxc] 1`] = `
|
||||
"Unexpected token (5:11)
|
||||
3 | m() {
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |"
|
||||
4 | let x;
|
||||
> 5 | for ({#x: x} of [this]);
|
||||
| ^^
|
||||
6 | }
|
||||
7 | }
|
||||
8 |"
|
||||
`;
|
||||
|
||||
exports[`nested-bindings.js format 1`] = `
|
||||
@@ -419,48 +372,48 @@ class C {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js [acorn] format 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
exports[`nested-bindings.js format[acorn] 1`] = `
|
||||
"Unexpected token (4:17)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token (4:11)"
|
||||
Cause: Unexpected token (4:16)"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js [espree] format 1`] = `
|
||||
"Unexpected token #x (4:12)
|
||||
exports[`nested-bindings.js format[espree] 1`] = `
|
||||
"Unexpected token #x (4:17)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:12)
|
||||
exports[`nested-bindings.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:17)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
|
||||
Cause: [4:16-4:17]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js [oxc] format 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
exports[`nested-bindings.js format[oxc] 1`] = `
|
||||
"Unexpected token (4:17)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^^
|
||||
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
|
||||
| ^^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |"
|
||||
@@ -489,3 +442,50 @@ class C {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js format[acorn] 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token (4:11)"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js format[espree] 1`] = `
|
||||
"Unexpected token #x (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: Unexpected token #x"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'PrivateField' (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |
|
||||
Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
|
||||
`;
|
||||
|
||||
exports[`valid-multiple-bindings.js format[oxc] 1`] = `
|
||||
"Unexpected token (4:12)
|
||||
2 | #x = 1;
|
||||
3 | m() {
|
||||
> 4 | const {#x: x1, #x: x2 = x1 } = this;
|
||||
| ^^
|
||||
5 | }
|
||||
6 | }
|
||||
7 |"
|
||||
`;
|
||||
@@ -1,17 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`destructuring.js [hermes] format 1`] = `
|
||||
"invalid assignment left-hand side (2:0)
|
||||
1 | const [one, two = null, three = null] = arr;
|
||||
> 2 | a = ([s=1,]) => 1
|
||||
3 | const { children, ...props } = this.props
|
||||
4 |
|
||||
5 | const { user: { firstName, lastName } } = this.props;
|
||||
Cause: invalid assignment left-hand side (2:0)
|
||||
a = ([s=1,]) => 1
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`destructuring.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -129,6 +117,18 @@ class A {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`destructuring.js format[hermes] 1`] = `
|
||||
"invalid assignment left-hand side (2:0)
|
||||
1 | const [one, two = null, three = null] = arr;
|
||||
> 2 | a = ([s=1,]) => 1
|
||||
3 | const { children, ...props } = this.props
|
||||
4 |
|
||||
5 | const { user: { firstName, lastName } } = this.props;
|
||||
Cause: invalid assignment left-hand side (2:0)
|
||||
a = ([s=1,]) => 1
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`issue-5988.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,52 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`call-arguments.js [acorn] format 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: Unexpected token (3:2)"
|
||||
`;
|
||||
|
||||
exports[`call-arguments.js [espree] format 1`] = `
|
||||
"Unexpected token do (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`call-arguments.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'do' (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: [3:2-3:4]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`call-arguments.js [oxc] format 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable""
|
||||
`;
|
||||
|
||||
exports[`call-arguments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -133,51 +86,51 @@ expect(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`do.js [acorn] format 1`] = `
|
||||
"Unexpected token (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
Cause: Unexpected token (3:4)"
|
||||
exports[`call-arguments.js format[acorn] 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: Unexpected token (3:2)"
|
||||
`;
|
||||
|
||||
exports[`do.js [espree] format 1`] = `
|
||||
"Unexpected token do (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
exports[`call-arguments.js format[espree] 1`] = `
|
||||
"Unexpected token do (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`do.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'do' (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
Cause: [3:4-3:6]: Unexpected token: 'do'"
|
||||
exports[`call-arguments.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'do' (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable"
|
||||
Cause: [3:2-3:4]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`do.js [oxc] format 1`] = `
|
||||
"Unexpected token (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }"
|
||||
exports[`call-arguments.js format[oxc] 1`] = `
|
||||
"Unexpected token (3:3)
|
||||
1 | // from https://github.com/babel/babel/pull/13122/
|
||||
2 | expect(
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | var bar = "foo";
|
||||
5 | if (!bar) throw new Error(
|
||||
6 | "unreachable""
|
||||
`;
|
||||
|
||||
exports[`do.js format 1`] = `
|
||||
@@ -330,3 +283,50 @@ function foo() {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`do.js format[acorn] 1`] = `
|
||||
"Unexpected token (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
Cause: Unexpected token (3:4)"
|
||||
`;
|
||||
|
||||
exports[`do.js format[espree] 1`] = `
|
||||
"Unexpected token do (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`do.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'do' (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }
|
||||
Cause: [3:4-3:6]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`do.js format[oxc] 1`] = `
|
||||
"Unexpected token (3:5)
|
||||
1 | const envSpecific = {
|
||||
2 | domain:
|
||||
> 3 | do {
|
||||
| ^^
|
||||
4 | if(env === 'production') 'https://abc.mno.com/';
|
||||
5 | else if(env === 'development') 'http://localhost:4000';
|
||||
6 | }"
|
||||
`;
|
||||
@@ -14,60 +14,6 @@ import("./foo.json", { assert: { type: "json" } });
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-phase.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js [flow] format 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js [hermes] format 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.source(\`data:text/javascript,
|
||||
^~~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.source(\`data:text/javascript,
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -94,25 +40,58 @@ import.source(String.raw\`data:text/javascript,
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`template-literal.js [flow] format 1`] = `
|
||||
"Unexpected token \`import\`, expected the end of an expression statement (\`;\`) (1:20)
|
||||
> 1 | module = await import(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
exports[`import-phase.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`);
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`template-literal.js [hermes] format 1`] = `
|
||||
"unexpected token after assignment expression (1:19)
|
||||
> 1 | module = await import(\`data:text/javascript,
|
||||
| ^
|
||||
exports[`import-phase.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`);
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: unexpected token after assignment expression (1:19)
|
||||
module = await import(\`data:text/javascript,
|
||||
^"
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.source(\`data:text/javascript,
|
||||
^~~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.source(\`data:text/javascript,
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`template-literal.js format 1`] = `
|
||||
@@ -141,6 +120,27 @@ module = await import(String.raw\`data:text/javascript,
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`template-literal.js format[flow] 1`] = `
|
||||
"Unexpected token \`import\`, expected the end of an expression statement (\`;\`) (1:20)
|
||||
> 1 | module = await import(\`data:text/javascript,
|
||||
| ^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`);
|
||||
4 |"
|
||||
`;
|
||||
|
||||
exports[`template-literal.js format[hermes] 1`] = `
|
||||
"unexpected token after assignment expression (1:19)
|
||||
> 1 | module = await import(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`);
|
||||
4 |
|
||||
Cause: unexpected token after assignment expression (1:19)
|
||||
module = await import(\`data:text/javascript,
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`test.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,53 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`default-escaped.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token (2:7)"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js [espree] format 1`] = `
|
||||
"Unexpected token n\\u{63} (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token n\\u{63}"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js [flow] format 1`] = `
|
||||
"Unexpected identifier, expected a declaration, statement or export specifiers (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js [hermes] format 1`] = `
|
||||
"expected declaration in export (2:7)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: expected declaration in export (2:7)
|
||||
export n\\u{63} from "async";
|
||||
^~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'identifier' (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^
|
||||
Cause: [2:7-2:14]: Unexpected token: 'identifier'"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow"]
|
||||
@@ -62,3 +14,51 @@ export nc from "async";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token (2:7)"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[espree] 1`] = `
|
||||
"Unexpected token n\\u{63} (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: Unexpected token n\\u{63}"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected a declaration, statement or export specifiers (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[hermes] 1`] = `
|
||||
"expected declaration in export (2:7)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^
|
||||
Cause: expected declaration in export (2:7)
|
||||
export n\\u{63} from "async";
|
||||
^~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'identifier' (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^
|
||||
Cause: [2:7-2:14]: Unexpected token: 'identifier'"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | // export asyn\\u{63} from "async";
|
||||
> 2 | export n\\u{63} from "async";
|
||||
| ^^^^^^^"
|
||||
`;
|
||||
+43
-43
@@ -1,48 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`export.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: Unexpected token (2:7)"
|
||||
`;
|
||||
|
||||
exports[`export.js [espree] format 1`] = `
|
||||
"Unexpected token v (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: Unexpected token v"
|
||||
`;
|
||||
|
||||
exports[`export.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'identifier' (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: [2:7-2:8]: Unexpected token: 'identifier'"
|
||||
`;
|
||||
|
||||
exports[`export.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';"
|
||||
`;
|
||||
|
||||
exports[`export.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -73,3 +30,46 @@ export {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: Unexpected token (2:7)"
|
||||
`;
|
||||
|
||||
exports[`export.js format[espree] 1`] = `
|
||||
"Unexpected token v (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: Unexpected token v"
|
||||
`;
|
||||
|
||||
exports[`export.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'identifier' (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';
|
||||
Cause: [2:7-2:8]: Unexpected token: 'identifier'"
|
||||
`;
|
||||
|
||||
exports[`export.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:8)
|
||||
1 | export * as ns from 'mod';
|
||||
> 2 | export v from 'mod';
|
||||
| ^
|
||||
3 | export a, * as b from 'mod';
|
||||
4 | export c, { foo } from 'mod';
|
||||
5 | export * as d from 'mod';"
|
||||
`;
|
||||
@@ -64,23 +64,6 @@ export * as from from "foo";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string.js [flow] format 1`] = `
|
||||
"Unexpected string, expected an identifier (1:13)
|
||||
> 1 | export * as 'foo' from 'foo'
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string.js [hermes] format 1`] = `
|
||||
"'identifier' expected in export clause (1:12)
|
||||
> 1 | export * as 'foo' from 'foo'
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'identifier' expected in export clause (1:12)
|
||||
export * as 'foo' from 'foo'
|
||||
~~~~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -95,20 +78,20 @@ export * as "foo" from "foo";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string2.js [flow] format 1`] = `
|
||||
exports[`export-star-as-string.js format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:13)
|
||||
> 1 | export * as "foo" from 'foo'
|
||||
> 1 | export * as 'foo' from 'foo'
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string2.js [hermes] format 1`] = `
|
||||
exports[`export-star-as-string.js format[hermes] 1`] = `
|
||||
"'identifier' expected in export clause (1:12)
|
||||
> 1 | export * as "foo" from 'foo'
|
||||
> 1 | export * as 'foo' from 'foo'
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'identifier' expected in export clause (1:12)
|
||||
export * as "foo" from 'foo'
|
||||
export * as 'foo' from 'foo'
|
||||
~~~~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
@@ -125,3 +108,20 @@ export * as "foo" from "foo";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string2.js format[flow] 1`] = `
|
||||
"Unexpected string, expected an identifier (1:13)
|
||||
> 1 | export * as "foo" from 'foo'
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`export-star-as-string2.js format[hermes] 1`] = `
|
||||
"'identifier' expected in export clause (1:12)
|
||||
> 1 | export * as "foo" from 'foo'
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'identifier' expected in export clause (1:12)
|
||||
export * as "foo" from 'foo'
|
||||
~~~~~~~~~~~~^"
|
||||
`;
|
||||
@@ -345,38 +345,6 @@ export * as foo from "./baz";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`undefined.js [acorn] format 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined (1:9)"
|
||||
`;
|
||||
|
||||
exports[`undefined.js [espree] format 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined"
|
||||
`;
|
||||
|
||||
exports[`undefined.js - {"bracketSpacing":false} [acorn] format 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined (1:9)"
|
||||
`;
|
||||
|
||||
exports[`undefined.js - {"bracketSpacing":false} [espree] format 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined"
|
||||
`;
|
||||
|
||||
exports[`undefined.js - {"bracketSpacing":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
@@ -392,6 +360,22 @@ export {undefinedExport};
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`undefined.js - {"bracketSpacing":false} format[acorn] 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined (1:9)"
|
||||
`;
|
||||
|
||||
exports[`undefined.js - {"bracketSpacing":false} format[espree] 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined"
|
||||
`;
|
||||
|
||||
exports[`undefined.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -405,3 +389,19 @@ export { undefinedExport };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`undefined.js format[acorn] 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined (1:9)"
|
||||
`;
|
||||
|
||||
exports[`undefined.js format[espree] 1`] = `
|
||||
"Export 'undefinedExport' is not defined (1:10)
|
||||
> 1 | export { undefinedExport };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Export 'undefinedExport' is not defined"
|
||||
`;
|
||||
@@ -1,17 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`async-identifier.js [meriyah] format 1`] = `
|
||||
"Expected '=>' (6:23)
|
||||
4 |
|
||||
5 | async function f() {
|
||||
> 6 | for await (async of []);
|
||||
| ^
|
||||
7 | for await ((async) of []);
|
||||
8 | for await ((foo) of async);
|
||||
9 | for await ((foo) of []) async;
|
||||
Cause: [6:22-6:23]: Expected '=>'"
|
||||
`;
|
||||
|
||||
exports[`async-identifier.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -43,3 +31,15 @@ async function f() {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async-identifier.js format[meriyah] 1`] = `
|
||||
"Expected '=>' (6:23)
|
||||
4 |
|
||||
5 | async function f() {
|
||||
> 6 | for await (async of []);
|
||||
| ^
|
||||
7 | for await ((async) of []);
|
||||
8 | for await ((foo) of async);
|
||||
9 | for await ((foo) of []) async;
|
||||
Cause: [6:22-6:23]: Expected '=>'"
|
||||
`;
|
||||
@@ -947,29 +947,6 @@ for (var i = 0; i < 10; ++i) 0;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js [flow] format 1`] = `
|
||||
"Invalid left-hand side in for-in (3:6)
|
||||
1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
|
||||
2 |
|
||||
> 3 | for (var a = (b in c) in {});
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
4 | for (var a = 1 || (b in c) in {});
|
||||
5 | for (var a = 1 + (2 || (b in c)) in {});
|
||||
6 | for (var a = (() => b in c) in {});"
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js [typescript] format 1`] = `
|
||||
"',' expected. (9:17)
|
||||
7 | for (var a = 1 || (() => b in c) in {});
|
||||
8 | for (var a = (() => { b in c; }) in {});
|
||||
> 9 | for (var a = [b in c] in {});
|
||||
| ^
|
||||
10 | for (var a = {b: b in c} in {});
|
||||
11 | // Meriyah can't parse
|
||||
12 | // for (var a = (x = b in c) => {} in {});
|
||||
Cause: ',' expected."
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -1012,6 +989,29 @@ for (var a = (function (x = b in c) {}) in {});
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js format[flow] 1`] = `
|
||||
"Invalid left-hand side in for-in (3:6)
|
||||
1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
|
||||
2 |
|
||||
> 3 | for (var a = (b in c) in {});
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
4 | for (var a = 1 || (b in c) in {});
|
||||
5 | for (var a = 1 + (2 || (b in c)) in {});
|
||||
6 | for (var a = (() => b in c) in {});"
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js format[typescript] 1`] = `
|
||||
"',' expected. (9:17)
|
||||
7 | for (var a = 1 || (() => b in c) in {});
|
||||
8 | for (var a = (() => { b in c; }) in {});
|
||||
> 9 | for (var a = [b in c] in {});
|
||||
| ^
|
||||
10 | for (var a = {b: b in c} in {});
|
||||
11 | // Meriyah can't parse
|
||||
12 | // for (var a = (x = b in c) => {} in {});
|
||||
Cause: ',' expected."
|
||||
`;
|
||||
|
||||
exports[`in.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -1065,29 +1065,6 @@ for (
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parentheses.js [flow] format 1`] = `
|
||||
"Unexpected token \`=>\`, expected the token \`;\` (11:27)
|
||||
9 | for (var a = [b in c];;);
|
||||
10 | for (var a = {b: b in c};;);
|
||||
> 11 | for (var a = (x = b in c) => {};;);
|
||||
| ^^
|
||||
12 | for (var a = class extends (b in c) {};;);
|
||||
13 | for (var a = function (x = b in c) {};;);
|
||||
14 |"
|
||||
`;
|
||||
|
||||
exports[`parentheses.js [typescript] format 1`] = `
|
||||
"',' expected. (9:17)
|
||||
7 | for (var a = 1 || (() => b in c);;);
|
||||
8 | for (var a = (() => { b in c; });;);
|
||||
> 9 | for (var a = [b in c];;);
|
||||
| ^
|
||||
10 | for (var a = {b: b in c};;);
|
||||
11 | for (var a = (x = b in c) => {};;);
|
||||
12 | for (var a = class extends (b in c) {};;);
|
||||
Cause: ',' expected."
|
||||
`;
|
||||
|
||||
exports[`parentheses.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -1186,6 +1163,29 @@ for (; (a = function (x = b in c) {}); );
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parentheses.js format[flow] 1`] = `
|
||||
"Unexpected token \`=>\`, expected the token \`;\` (11:27)
|
||||
9 | for (var a = [b in c];;);
|
||||
10 | for (var a = {b: b in c};;);
|
||||
> 11 | for (var a = (x = b in c) => {};;);
|
||||
| ^^
|
||||
12 | for (var a = class extends (b in c) {};;);
|
||||
13 | for (var a = function (x = b in c) {};;);
|
||||
14 |"
|
||||
`;
|
||||
|
||||
exports[`parentheses.js format[typescript] 1`] = `
|
||||
"',' expected. (9:17)
|
||||
7 | for (var a = 1 || (() => b in c);;);
|
||||
8 | for (var a = (() => { b in c; });;);
|
||||
> 9 | for (var a = [b in c];;);
|
||||
| ^
|
||||
10 | for (var a = {b: b in c};;);
|
||||
11 | for (var a = (x = b in c) => {};;);
|
||||
12 | for (var a = class extends (b in c) {};;);
|
||||
Cause: ',' expected."
|
||||
`;
|
||||
|
||||
exports[`var.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
@@ -1,54 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`class-expression-decorator.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: Unexpected character '@' (3:2)"
|
||||
`;
|
||||
|
||||
exports[`class-expression-decorator.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`class-expression-decorator.js [flow] format 1`] = `
|
||||
"Unexpected token \`@\` (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |"
|
||||
`;
|
||||
|
||||
exports[`class-expression-decorator.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (3:2)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: unrecognized character '@' (3:2)
|
||||
@decorator
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`class-expression-decorator.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -71,35 +22,53 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`decorator.js [acorn] format 1`] = `
|
||||
"Unexpected character '@' (2:1)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
| ^
|
||||
3 | class A {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (2:0)"
|
||||
exports[`class-expression-decorator.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: Unexpected character '@' (3:2)"
|
||||
`;
|
||||
|
||||
exports[`decorator.js [espree] format 1`] = `
|
||||
"Unexpected character '@' (2:1)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
| ^
|
||||
3 | class A {}
|
||||
4 |
|
||||
exports[`class-expression-decorator.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`decorator.js [hermes] format 1`] = `
|
||||
"unrecognized character '@' (2:0)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
3 | class A {}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (2:0)
|
||||
@decorator
|
||||
^"
|
||||
exports[`class-expression-decorator.js format[flow] 1`] = `
|
||||
"Unexpected token \`@\` (3:3)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |"
|
||||
`;
|
||||
|
||||
exports[`class-expression-decorator.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (3:2)
|
||||
1 | (
|
||||
2 | // prettier-ignore
|
||||
> 3 | @decorator
|
||||
| ^
|
||||
4 | class {}
|
||||
5 | );
|
||||
6 |
|
||||
Cause: unrecognized character '@' (3:2)
|
||||
@decorator
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`decorator.js format 1`] = `
|
||||
@@ -120,6 +89,37 @@ class A {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`decorator.js format[acorn] 1`] = `
|
||||
"Unexpected character '@' (2:1)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
| ^
|
||||
3 | class A {}
|
||||
4 |
|
||||
Cause: Unexpected character '@' (2:0)"
|
||||
`;
|
||||
|
||||
exports[`decorator.js format[espree] 1`] = `
|
||||
"Unexpected character '@' (2:1)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
| ^
|
||||
3 | class A {}
|
||||
4 |
|
||||
Cause: Unexpected character '@'"
|
||||
`;
|
||||
|
||||
exports[`decorator.js format[hermes] 1`] = `
|
||||
"unrecognized character '@' (2:0)
|
||||
1 | // prettier-ignore
|
||||
> 2 | @decorator
|
||||
3 | class A {}
|
||||
4 |
|
||||
Cause: unrecognized character '@' (2:0)
|
||||
@decorator
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`ignore.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
@@ -14,30 +14,6 @@ import("./foo.json", { assert: { type: "json" } });
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (2:32)
|
||||
1 | export * as foo from "foo.json"
|
||||
> 2 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
3 | export * as baz from "baz.json" assert { /* comment */ }
|
||||
4 |
|
||||
5 | import * as foo from "foo.json"
|
||||
Cause: Missing semicolon. (2:31)"
|
||||
`;
|
||||
|
||||
exports[`empty.js [hermes] format 1`] = `
|
||||
"';' expected (2:32)
|
||||
1 | export * as foo from "foo.json"
|
||||
> 2 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
3 | export * as baz from "baz.json" assert { /* comment */ }
|
||||
4 |
|
||||
5 | import * as foo from "foo.json"
|
||||
Cause: ';' expected (2:32)
|
||||
export * as bar from "bar.json" assert { }
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`empty.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["oxc", "typescript", "hermes"]
|
||||
@@ -63,28 +39,28 @@ import * as baz from "baz.json" /* comment */ assert {};
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`keyword-detect.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:21)
|
||||
> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
| ^
|
||||
2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
3 |
|
||||
4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
Cause: Missing semicolon. (1:20)"
|
||||
exports[`empty.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (2:32)
|
||||
1 | export * as foo from "foo.json"
|
||||
> 2 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
3 | export * as baz from "baz.json" assert { /* comment */ }
|
||||
4 |
|
||||
5 | import * as foo from "foo.json"
|
||||
Cause: Missing semicolon. (2:31)"
|
||||
`;
|
||||
|
||||
exports[`keyword-detect.js [hermes] format 1`] = `
|
||||
"';' expected (4:52)
|
||||
2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
3 |
|
||||
> 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
| ^
|
||||
5 |
|
||||
6 | export * from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
7 |
|
||||
Cause: ';' expected (4:52)
|
||||
export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
^"
|
||||
exports[`empty.js format[hermes] 1`] = `
|
||||
"';' expected (2:32)
|
||||
1 | export * as foo from "foo.json"
|
||||
> 2 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
3 | export * as baz from "baz.json" assert { /* comment */ }
|
||||
4 |
|
||||
5 | import * as foo from "foo.json"
|
||||
Cause: ';' expected (2:32)
|
||||
export * as bar from "bar.json" assert { }
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`keyword-detect.js format 1`] = `
|
||||
@@ -111,12 +87,28 @@ export * from "./test.json" /* with */ /* with */ assert { type: "json" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multi-types.js [babel-ts] format 1`] = `
|
||||
"Unexpected token (1:58)
|
||||
> 1 | import json from "./foo.json" assert { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:57)"
|
||||
exports[`keyword-detect.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:21)
|
||||
> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
| ^
|
||||
2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
3 |
|
||||
4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
Cause: Missing semicolon. (1:20)"
|
||||
`;
|
||||
|
||||
exports[`keyword-detect.js format[hermes] 1`] = `
|
||||
"';' expected (4:52)
|
||||
2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
3 |
|
||||
> 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
| ^
|
||||
5 |
|
||||
6 | export * from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
7 |
|
||||
Cause: ';' expected (4:52)
|
||||
export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js format 1`] = `
|
||||
@@ -133,12 +125,12 @@ import json from "./foo.json" assert { type: "json", type: "bar" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`non-type.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:27)
|
||||
> 1 | import foo from "foo.json" assert { lazy: "true" };
|
||||
| ^
|
||||
exports[`multi-types.js format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:58)
|
||||
> 1 | import json from "./foo.json" assert { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:26)"
|
||||
Cause: Unexpected token (1:57)"
|
||||
`;
|
||||
|
||||
exports[`non-type.js format 1`] = `
|
||||
@@ -155,6 +147,14 @@ import foo from "foo.json" assert { lazy: "true" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`non-type.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:27)
|
||||
> 1 | import foo from "foo.json" assert { lazy: "true" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:26)"
|
||||
`;
|
||||
|
||||
exports[`not-import-assertions.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["oxc", "typescript", "hermes"]
|
||||
@@ -171,28 +171,6 @@ assert({ type: "json" });
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`re-export.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 | export * from "foo.json" assert { type: "json" };
|
||||
3 | export * as foo3 from "foo.json" assert { type: "json" };
|
||||
4 |
|
||||
Cause: Missing semicolon. (1:42)"
|
||||
`;
|
||||
|
||||
exports[`re-export.js [hermes] format 1`] = `
|
||||
"';' expected (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 | export * from "foo.json" assert { type: "json" };
|
||||
3 | export * as foo3 from "foo.json" assert { type: "json" };
|
||||
4 |
|
||||
Cause: ';' expected (1:43)
|
||||
export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`re-export.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["oxc", "typescript", "hermes"]
|
||||
@@ -211,12 +189,26 @@ export * as foo3 from "foo.json" assert { type: "json" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-import.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:30)
|
||||
> 1 | import json from "./foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:29)"
|
||||
exports[`re-export.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 | export * from "foo.json" assert { type: "json" };
|
||||
3 | export * as foo3 from "foo.json" assert { type: "json" };
|
||||
4 |
|
||||
Cause: Missing semicolon. (1:42)"
|
||||
`;
|
||||
|
||||
exports[`re-export.js format[hermes] 1`] = `
|
||||
"';' expected (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 | export * from "foo.json" assert { type: "json" };
|
||||
3 | export * as foo3 from "foo.json" assert { type: "json" };
|
||||
4 |
|
||||
Cause: ';' expected (1:43)
|
||||
export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`static-import.js format 1`] = `
|
||||
@@ -233,12 +225,12 @@ import json from "./foo.json" assert { type: "json" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`without-from.js [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:13)
|
||||
> 1 | import "foo" assert { type: "json" }
|
||||
| ^
|
||||
exports[`static-import.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:30)
|
||||
> 1 | import json from "./foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:12)"
|
||||
Cause: Missing semicolon. (1:29)"
|
||||
`;
|
||||
|
||||
exports[`without-from.js format 1`] = `
|
||||
@@ -254,3 +246,11 @@ import "foo" assert { type: "json" };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`without-from.js format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:13)
|
||||
> 1 | import "foo" assert { type: "json" }
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:12)"
|
||||
`;
|
||||
+35
-35
@@ -15,22 +15,6 @@ import("./foo.json", {assert: {type: "json"}});
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:32)
|
||||
> 1 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
Cause: Missing semicolon. (1:31)"
|
||||
`;
|
||||
|
||||
exports[`empty.js - {"bracketSpacing":false} [hermes] format 1`] = `
|
||||
"';' expected (1:32)
|
||||
> 1 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
Cause: ';' expected (1:32)
|
||||
export * as bar from "bar.json" assert { }
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`empty.js - {"bracketSpacing":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
@@ -45,22 +29,20 @@ export * as bar from "bar.json" assert {};
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`re-export.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:42)"
|
||||
exports[`empty.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:32)
|
||||
> 1 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
Cause: Missing semicolon. (1:31)"
|
||||
`;
|
||||
|
||||
exports[`re-export.js - {"bracketSpacing":false} [hermes] format 1`] = `
|
||||
"';' expected (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: ';' expected (1:43)
|
||||
export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
^"
|
||||
exports[`empty.js - {"bracketSpacing":false} format[hermes] 1`] = `
|
||||
"';' expected (1:32)
|
||||
> 1 | export * as bar from "bar.json" assert { }
|
||||
| ^
|
||||
Cause: ';' expected (1:32)
|
||||
export * as bar from "bar.json" assert { }
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`re-export.js - {"bracketSpacing":false} format 1`] = `
|
||||
@@ -78,12 +60,22 @@ export {default as foo2} from "foo.json" assert {type: "json"};
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-import.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
|
||||
"Missing semicolon. (1:30)
|
||||
> 1 | import json from "./foo.json" assert { type: "json" };
|
||||
| ^
|
||||
exports[`re-export.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:29)"
|
||||
Cause: Missing semicolon. (1:42)"
|
||||
`;
|
||||
|
||||
exports[`re-export.js - {"bracketSpacing":false} format[hermes] 1`] = `
|
||||
"';' expected (1:43)
|
||||
> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: ';' expected (1:43)
|
||||
export { default as foo2 } from "foo.json" assert { type: "json" };
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`static-import.js - {"bracketSpacing":false} format 1`] = `
|
||||
@@ -100,3 +92,11 @@ import json from "./foo.json" assert {type: "json"};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`static-import.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
|
||||
"Missing semicolon. (1:30)
|
||||
> 1 | import json from "./foo.json" assert { type: "json" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Missing semicolon. (1:29)"
|
||||
`;
|
||||
@@ -178,30 +178,6 @@ import(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multi-types.js [acorn] format 1`] = `
|
||||
"Duplicate attribute key 'type' (1:52)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Duplicate attribute key 'type' (1:51)"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js [espree] format 1`] = `
|
||||
"Duplicate attribute key 'type' (1:52)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Duplicate attribute key 'type'"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js [meriyah] format 1`] = `
|
||||
"Duplicate binding 'type' (1:64)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:63-1:64]: Duplicate binding 'type'"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript"]
|
||||
@@ -216,6 +192,30 @@ import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multi-types.js format[acorn] 1`] = `
|
||||
"Duplicate attribute key 'type' (1:52)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Duplicate attribute key 'type' (1:51)"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js format[espree] 1`] = `
|
||||
"Duplicate attribute key 'type' (1:52)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Duplicate attribute key 'type'"
|
||||
`;
|
||||
|
||||
exports[`multi-types.js format[meriyah] 1`] = `
|
||||
"Duplicate binding 'type' (1:64)
|
||||
> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:63-1:64]: Duplicate binding 'type'"
|
||||
`;
|
||||
|
||||
exports[`multiple.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript"]
|
||||
|
||||
@@ -1,59 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`import-defer.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [flow] format 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [hermes] format 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -76,6 +22,60 @@ import.defer(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -101,60 +101,6 @@ import.meta
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-source.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source.js [flow] format 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
|
||||
`;
|
||||
|
||||
exports[`import-source.js [hermes] format 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^~~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-source.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -176,3 +122,57 @@ import.source(
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:7)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^~~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^^^^^^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
@@ -1,21 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`duplicate_bindings.js [acorn] format 1`] = `
|
||||
"Identifier 'A' has already been declared (1:19)
|
||||
> 1 | class A{} class A{}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Identifier 'A' has already been declared (1:18)"
|
||||
`;
|
||||
|
||||
exports[`duplicate_bindings.js [espree] format 1`] = `
|
||||
"Identifier 'A' has already been declared (1:19)
|
||||
> 1 | class A{} class A{}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Identifier 'A' has already been declared"
|
||||
`;
|
||||
|
||||
exports[`duplicate_bindings.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -30,3 +14,19 @@ class A {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`duplicate_bindings.js format[acorn] 1`] = `
|
||||
"Identifier 'A' has already been declared (1:19)
|
||||
> 1 | class A{} class A{}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Identifier 'A' has already been declared (1:18)"
|
||||
`;
|
||||
|
||||
exports[`duplicate_bindings.js format[espree] 1`] = `
|
||||
"Identifier 'A' has already been declared (1:19)
|
||||
> 1 | class A{} class A{}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Identifier 'A' has already been declared"
|
||||
`;
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`comments.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: Unexpected token (1:31)"
|
||||
`;
|
||||
|
||||
exports[`comments.js [espree] format 1`] = `
|
||||
"Unexpected token { (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`comments.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '{' (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: [1:31-1:32]: Unexpected token: '{'"
|
||||
`;
|
||||
|
||||
exports[`comments.js [oxc] format 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:24)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/"
|
||||
`;
|
||||
|
||||
exports[`comments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -72,43 +33,43 @@ const m2 = module /* B1 */ {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
Cause: Unexpected token (1:7)"
|
||||
exports[`comments.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: Unexpected token (1:31)"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js [espree] format 1`] = `
|
||||
"Unexpected token { (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
exports[`comments.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '{' (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
Cause: [1:7-1:8]: Unexpected token: '{'"
|
||||
exports[`comments.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '{' (1:32)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/
|
||||
Cause: [1:31-1:32]: Unexpected token: '{'"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js [oxc] format 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {"
|
||||
exports[`comments.js format[oxc] 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:24)
|
||||
> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
|
||||
| ^
|
||||
2 | /*A4*/
|
||||
3 | export const foo = "foo";
|
||||
4 | export { foo }; /*A5*/"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js format 1`] = `
|
||||
@@ -211,6 +172,45 @@ let m = module {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
Cause: Unexpected token (1:7)"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '{' (1:8)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {
|
||||
Cause: [1:7-1:8]: Unexpected token: '{'"
|
||||
`;
|
||||
|
||||
exports[`module-blocks.js format[oxc] 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
|
||||
> 1 | module { await 3 };
|
||||
| ^
|
||||
2 |
|
||||
3 | class B {
|
||||
4 | #p() {"
|
||||
`;
|
||||
|
||||
exports[`non-module-blocks.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -228,45 +228,6 @@ const m = module;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: Unexpected token (1:25)"
|
||||
`;
|
||||
|
||||
exports[`range.js [espree] format 1`] = `
|
||||
"Unexpected token { (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`range.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '{' (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: [1:25-1:26]: Unexpected token: '{'"
|
||||
`;
|
||||
|
||||
exports[`range.js [oxc] format 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:25)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })"
|
||||
`;
|
||||
|
||||
exports[`range.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -295,3 +256,42 @@ foo(module {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: Unexpected token (1:25)"
|
||||
`;
|
||||
|
||||
exports[`range.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`range.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '{' (1:26)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })
|
||||
Cause: [1:25-1:26]: Unexpected token: '{'"
|
||||
`;
|
||||
|
||||
exports[`range.js format[oxc] 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:25)
|
||||
> 1 | let moduleBlock = module { export let y = 1;
|
||||
| ^
|
||||
2 | };
|
||||
3 |
|
||||
4 | foo(module { export let foo = "foo"; })"
|
||||
`;
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`worker.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: Unexpected token (1:27)"
|
||||
`;
|
||||
|
||||
exports[`worker.js [espree] format 1`] = `
|
||||
"Unexpected token { (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`worker.js [meriyah] format 1`] = `
|
||||
"Expected ')' (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: [1:27-1:28]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`worker.js [oxc] format 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`{\` (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());"
|
||||
`;
|
||||
|
||||
exports[`worker.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -135,3 +96,42 @@ worker.postMessage(module {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`worker.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: Unexpected token (1:27)"
|
||||
`;
|
||||
|
||||
exports[`worker.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`worker.js format[meriyah] 1`] = `
|
||||
"Expected ')' (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());
|
||||
Cause: [1:27-1:28]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`worker.js format[oxc] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`{\` (1:28)
|
||||
> 1 | worker = new Worker(module {
|
||||
| ^
|
||||
2 | onmessage = function({data}) {
|
||||
3 | let mod = import(data);
|
||||
4 | postMessage(mod.fn());"
|
||||
`;
|
||||
@@ -1,98 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`text.js [acorn] format 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Bad escape sequence in untagged template literal (6:17)"
|
||||
`;
|
||||
|
||||
exports[`text.js [espree] format 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Bad escape sequence in untagged template literal"
|
||||
`;
|
||||
|
||||
exports[`text.js [flow] format 1`] = `
|
||||
"Unexpected token ILLEGAL (1:12)
|
||||
> 1 | foo = foo\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
2 | foo = html\`\\u{prettier}\\u{0065}\`;
|
||||
3 | foo = graphql\`\\u{prettier}\\u{0065}\`;
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js [hermes] format 1`] = `
|
||||
"untagged template literal contains invalid escape sequence (6:16)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: untagged template literal contains invalid escape sequence (6:16)
|
||||
foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
^~~~~~~~~~~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`text.js [meriyah] format 1`] = `
|
||||
"Invalid hexadecimal escape sequence (6:17)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: [6:16-6:20]: Invalid hexadecimal escape sequence"
|
||||
`;
|
||||
|
||||
exports[`text.js [oxc] format 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js [oxc-ts] format 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js [typescript] format 1`] = `
|
||||
"Hexadecimal digit expected. (6:21)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Hexadecimal digit expected."
|
||||
`;
|
||||
|
||||
exports[`text.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -166,3 +73,96 @@ foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttie
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`text.js format[acorn] 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Bad escape sequence in untagged template literal (6:17)"
|
||||
`;
|
||||
|
||||
exports[`text.js format[espree] 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Bad escape sequence in untagged template literal"
|
||||
`;
|
||||
|
||||
exports[`text.js format[flow] 1`] = `
|
||||
"Unexpected token ILLEGAL (1:12)
|
||||
> 1 | foo = foo\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
2 | foo = html\`\\u{prettier}\\u{0065}\`;
|
||||
3 | foo = graphql\`\\u{prettier}\\u{0065}\`;
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js format[hermes] 1`] = `
|
||||
"untagged template literal contains invalid escape sequence (6:16)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: untagged template literal contains invalid escape sequence (6:16)
|
||||
foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
^~~~~~~~~~~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`text.js format[meriyah] 1`] = `
|
||||
"Invalid hexadecimal escape sequence (6:17)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: [6:16-6:20]: Invalid hexadecimal escape sequence"
|
||||
`;
|
||||
|
||||
exports[`text.js format[oxc] 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js format[oxc-ts] 1`] = `
|
||||
"Bad escape sequence in untagged template literal (6:18)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
|
||||
`;
|
||||
|
||||
exports[`text.js format[typescript] 1`] = `
|
||||
"Hexadecimal digit expected. (6:21)
|
||||
4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
|
||||
5 | foo = css\`\\u{prettier}\\u{0065}\`;
|
||||
> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
|
||||
| ^
|
||||
7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
|
||||
8 |
|
||||
9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
|
||||
Cause: Hexadecimal digit expected."
|
||||
`;
|
||||
@@ -1,38 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`outside-functions.js [acorn] format 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (1:11)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' can only be used in functions and class static block (1:10)"
|
||||
`;
|
||||
|
||||
exports[`outside-functions.js [espree] format 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (1:11)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' can only be used in functions and class static block"
|
||||
`;
|
||||
|
||||
exports[`outside-functions.js [flow] format 1`] = `
|
||||
"Unexpected token \`.\` (1:14)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`outside-functions.js [hermes] format 1`] = `
|
||||
"'new.target' not in a function (1:10)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' not in a function (1:10)
|
||||
const x = new.target;
|
||||
^~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`outside-functions.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -47,36 +14,37 @@ const x = new.target;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range.js [acorn] format 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (2:1)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^
|
||||
Cause: 'new.target' can only be used in functions and class static block (2:0)"
|
||||
exports[`outside-functions.js format[acorn] 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (1:11)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' can only be used in functions and class static block (1:10)"
|
||||
`;
|
||||
|
||||
exports[`range.js [espree] format 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (2:1)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^
|
||||
exports[`outside-functions.js format[espree] 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (1:11)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' can only be used in functions and class static block"
|
||||
`;
|
||||
|
||||
exports[`range.js [flow] format 1`] = `
|
||||
"Unexpected token \`.\` (2:4)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^"
|
||||
exports[`outside-functions.js format[flow] 1`] = `
|
||||
"Unexpected token \`.\` (1:14)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`range.js [hermes] format 1`] = `
|
||||
"'new.target' not in a function (2:0)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
Cause: 'new.target' not in a function (2:0)
|
||||
new.target;
|
||||
^~~~~~~~~~"
|
||||
exports[`outside-functions.js format[hermes] 1`] = `
|
||||
"'new.target' not in a function (1:10)
|
||||
> 1 | const x = new.target;
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'new.target' not in a function (1:10)
|
||||
const x = new.target;
|
||||
^~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`range.js format 1`] = `
|
||||
@@ -105,3 +73,35 @@ class A {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range.js format[acorn] 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (2:1)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^
|
||||
Cause: 'new.target' can only be used in functions and class static block (2:0)"
|
||||
`;
|
||||
|
||||
exports[`range.js format[espree] 1`] = `
|
||||
"'new.target' can only be used in functions and class static block (2:1)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^
|
||||
Cause: 'new.target' can only be used in functions and class static block"
|
||||
`;
|
||||
|
||||
exports[`range.js format[flow] 1`] = `
|
||||
"Unexpected token \`.\` (2:4)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`range.js format[hermes] 1`] = `
|
||||
"'new.target' not in a function (2:0)
|
||||
1 | const x =
|
||||
> 2 | new.target;
|
||||
Cause: 'new.target' not in a function (2:0)
|
||||
new.target;
|
||||
^~~~~~~~~~"
|
||||
`;
|
||||
@@ -1,91 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`no-semi.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js [espree] format 1`] = `
|
||||
"Unexpected token : (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js [meriyah] format 1`] = `
|
||||
"Unexpected token: ':' (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: [2:1-2:2]: Unexpected token: ':'"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} [acorn] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} [espree] format 1`] = `
|
||||
"Unexpected token : (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = `
|
||||
"Unexpected token: ':' (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: [2:1-2:2]: Unexpected token: ':'"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} [oxc] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -121,6 +35,49 @@ class A {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} format[acorn] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} format[espree] 1`] = `
|
||||
"Unexpected token : (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} format[meriyah] 1`] = `
|
||||
"Unexpected token: ':' (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: [2:1-2:2]: Unexpected token: ':'"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js - {"semi":false} format[oxc] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -154,3 +111,46 @@ class A {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-semi.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js format[espree] 1`] = `
|
||||
"Unexpected token : (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js format[meriyah] 1`] = `
|
||||
"Unexpected token: ':' (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;
|
||||
Cause: [2:1-2:2]: Unexpected token: ':'"
|
||||
`;
|
||||
|
||||
exports[`no-semi.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | a
|
||||
> 2 | ;::b.c
|
||||
| ^
|
||||
3 |
|
||||
4 | class A {
|
||||
5 | a = b;"
|
||||
`;
|
||||
@@ -44,14 +44,6 @@ function myFunction() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`octal-number.js [typescript] format 1`] = `
|
||||
"Octal literals are not allowed. Use the syntax '0o777'. (1:1)
|
||||
> 1 | 0777
|
||||
| ^
|
||||
2 |
|
||||
Cause: Octal literals are not allowed. Use the syntax '0o777'."
|
||||
`;
|
||||
|
||||
exports[`octal-number.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript"]
|
||||
@@ -65,3 +57,11 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`octal-number.js format[typescript] 1`] = `
|
||||
"Octal literals are not allowed. Use the syntax '0o777'. (1:1)
|
||||
> 1 | 0777
|
||||
| ^
|
||||
2 |
|
||||
Cause: Octal literals are not allowed. Use the syntax '0o777'."
|
||||
`;
|
||||
@@ -1,16 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`number.js [typescript] format 1`] = `
|
||||
"Decimals with leading zeros are not allowed. (3:5)
|
||||
1 | // https://github.com/babel/babel/pull/11854
|
||||
2 |
|
||||
> 3 | a = 09e1_1;
|
||||
| ^
|
||||
4 | a = 09.1_1;
|
||||
5 |
|
||||
Cause: Decimals with leading zeros are not allowed."
|
||||
`;
|
||||
|
||||
exports[`number.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript"]
|
||||
@@ -30,3 +19,14 @@ a = 09.1_1;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`number.js format[typescript] 1`] = `
|
||||
"Decimals with leading zeros are not allowed. (3:5)
|
||||
1 | // https://github.com/babel/babel/pull/11854
|
||||
2 |
|
||||
> 3 | a = 09e1_1;
|
||||
| ^
|
||||
4 | a = 09.1_1;
|
||||
5 |
|
||||
Cause: Decimals with leading zeros are not allowed."
|
||||
`;
|
||||
@@ -70,101 +70,6 @@ const Component2 = ({ props }) => <Text>Test</Text>;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`expression.js [acorn] format 1`] = `
|
||||
"Unexpected token (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: Unexpected token (5:3)"
|
||||
`;
|
||||
|
||||
exports[`expression.js [espree] format 1`] = `
|
||||
"Unexpected token : (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`expression.js [flow] format 1`] = `
|
||||
"Unexpected token \`:\`, expected a type (5:5)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js [hermes] format 1`] = `
|
||||
"unexpected token in type annotation (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: unexpected token in type annotation (5:4)
|
||||
({}::b, 0);
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`expression.js [meriyah] format 1`] = `
|
||||
"Expected ')' (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: [5:3-5:4]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`expression.js [oxc] format 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js [oxc-ts] format 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js [typescript] format 1`] = `
|
||||
"')' expected. (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: ')' expected."
|
||||
`;
|
||||
|
||||
exports[`expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
@@ -226,6 +131,101 @@ const a3 = {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`expression.js format[acorn] 1`] = `
|
||||
"Unexpected token (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: Unexpected token (5:3)"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[espree] 1`] = `
|
||||
"Unexpected token : (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: Unexpected token :"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[flow] 1`] = `
|
||||
"Unexpected token \`:\`, expected a type (5:5)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[hermes] 1`] = `
|
||||
"unexpected token in type annotation (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: unexpected token in type annotation (5:4)
|
||||
({}::b, 0);
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[meriyah] 1`] = `
|
||||
"Expected ')' (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: [5:3-5:4]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[oxc] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[oxc-ts] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`:\` (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);"
|
||||
`;
|
||||
|
||||
exports[`expression.js format[typescript] 1`] = `
|
||||
"')' expected. (5:4)
|
||||
3 | a = () => ({}).x;
|
||||
4 | ({} && a, b);
|
||||
> 5 | ({}::b, 0);
|
||||
| ^
|
||||
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
|
||||
7 | ({}(), 0);
|
||||
8 | ({} = 0);
|
||||
Cause: ')' expected."
|
||||
`;
|
||||
|
||||
exports[`getter-setter.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-arr.js [acorn] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^
|
||||
@@ -16,7 +16,7 @@ exports[`invalid-destructuring-arr.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-arr.js [babel] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^
|
||||
@@ -24,7 +24,7 @@ exports[`invalid-destructuring-arr.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-arr.js [espree] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^
|
||||
@@ -32,7 +32,7 @@ exports[`invalid-destructuring-arr.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-arr.js [meriyah] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in assignment (1:10)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^
|
||||
@@ -40,14 +40,14 @@ exports[`invalid-destructuring-arr.js [meriyah] format 1`] = `
|
||||
Cause: [1:9-1:10]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-arr.js [oxc] format 1`] = `
|
||||
exports[`invalid-destructuring-arr.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:2)
|
||||
> 1 | [a?.b] = [];
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^
|
||||
@@ -55,7 +55,7 @@ exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [acorn] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:10)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^
|
||||
@@ -63,7 +63,7 @@ exports[`invalid-destructuring-obj.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:9)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [babel] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^
|
||||
@@ -71,7 +71,7 @@ exports[`invalid-destructuring-obj.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [espree] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:10)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^
|
||||
@@ -79,7 +79,7 @@ exports[`invalid-destructuring-obj.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [meriyah] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in assignment (1:19)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^
|
||||
@@ -87,14 +87,14 @@ exports[`invalid-destructuring-obj.js [meriyah] format 1`] = `
|
||||
Cause: [1:18-1:19]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`invalid-destructuring-obj.js [oxc] format 1`] = `
|
||||
exports[`invalid-destructuring-obj.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:10)
|
||||
> 1 | ({ prop: a?.b } = {});
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[__babel_estree] 1`] = `
|
||||
"Unexpected token, expected "," (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^
|
||||
@@ -102,7 +102,7 @@ exports[`invalid-fn-param.js [__babel_estree] format 1`] = `
|
||||
Cause: Unexpected token, expected "," (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [acorn] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^
|
||||
@@ -110,7 +110,7 @@ exports[`invalid-fn-param.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [babel] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[babel] 1`] = `
|
||||
"Unexpected token, expected "," (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^
|
||||
@@ -118,7 +118,7 @@ exports[`invalid-fn-param.js [babel] format 1`] = `
|
||||
Cause: Unexpected token, expected "," (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [espree] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[espree] 1`] = `
|
||||
"Unexpected token ?. (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^
|
||||
@@ -126,7 +126,7 @@ exports[`invalid-fn-param.js [espree] format 1`] = `
|
||||
Cause: Unexpected token ?."
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [meriyah] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[meriyah] 1`] = `
|
||||
"Expected ')' (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^^
|
||||
@@ -134,14 +134,14 @@ exports[`invalid-fn-param.js [meriyah] format 1`] = `
|
||||
Cause: [1:12-1:14]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param.js [oxc] format 1`] = `
|
||||
exports[`invalid-fn-param.js format[oxc] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`?.\` (1:13)
|
||||
> 1 | function f(a?.b) {}
|
||||
| ^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of function parameter list. (1:2)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^
|
||||
@@ -149,7 +149,7 @@ exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [acorn] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^
|
||||
@@ -157,7 +157,7 @@ exports[`invalid-fn-param-arrow.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [babel] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of function parameter list. (1:2)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^
|
||||
@@ -165,7 +165,7 @@ exports[`invalid-fn-param-arrow.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [espree] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^
|
||||
@@ -173,7 +173,7 @@ exports[`invalid-fn-param-arrow.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[meriyah] 1`] = `
|
||||
"The left-hand side of the arrow can only be destructed through assignment (1:8)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^^
|
||||
@@ -181,14 +181,14 @@ exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = `
|
||||
Cause: [1:7-1:9]: The left-hand side of the arrow can only be destructed through assignment"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-arrow.js [oxc] format 1`] = `
|
||||
exports[`invalid-fn-param-arrow.js format[oxc] 1`] = `
|
||||
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
|
||||
> 1 | (a?.b) => {}
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[__babel_estree] 1`] = `
|
||||
"Unexpected token, expected "," (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^
|
||||
@@ -196,7 +196,7 @@ exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = `
|
||||
Cause: Unexpected token, expected "," (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [acorn] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^
|
||||
@@ -204,7 +204,7 @@ exports[`invalid-fn-param-assign.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [babel] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[babel] 1`] = `
|
||||
"Unexpected token, expected "," (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^
|
||||
@@ -212,7 +212,7 @@ exports[`invalid-fn-param-assign.js [babel] format 1`] = `
|
||||
Cause: Unexpected token, expected "," (1:12)"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [espree] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[espree] 1`] = `
|
||||
"Unexpected token ?. (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^
|
||||
@@ -220,7 +220,7 @@ exports[`invalid-fn-param-assign.js [espree] format 1`] = `
|
||||
Cause: Unexpected token ?."
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [meriyah] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[meriyah] 1`] = `
|
||||
"Expected ')' (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^^
|
||||
@@ -228,14 +228,14 @@ exports[`invalid-fn-param-assign.js [meriyah] format 1`] = `
|
||||
Cause: [1:12-1:14]: Expected ')'"
|
||||
`;
|
||||
|
||||
exports[`invalid-fn-param-assign.js [oxc] format 1`] = `
|
||||
exports[`invalid-fn-param-assign.js format[oxc] 1`] = `
|
||||
"Expected \`,\` or \`)\` but found \`?.\` (1:13)
|
||||
> 1 | function f(a?.b = c) {}
|
||||
| ^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -243,7 +243,7 @@ exports[`invalid-for-await-of.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [acorn] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -251,7 +251,7 @@ exports[`invalid-for-await-of.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [babel] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -259,7 +259,7 @@ exports[`invalid-for-await-of.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [espree] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -267,7 +267,7 @@ exports[`invalid-for-await-of.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [meriyah] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in for-of (1:11)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^^
|
||||
@@ -275,14 +275,14 @@ exports[`invalid-for-await-of.js [meriyah] format 1`] = `
|
||||
Cause: [1:10-1:12]: Invalid left-hand side in for-of"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-await-of.js [oxc] format 1`] = `
|
||||
exports[`invalid-for-await-of.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-for-in.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-in statement. (1:6)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^
|
||||
@@ -290,7 +290,7 @@ exports[`invalid-for-in.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [acorn] format 1`] = `
|
||||
exports[`invalid-for-in.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^
|
||||
@@ -298,7 +298,7 @@ exports[`invalid-for-in.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [babel] format 1`] = `
|
||||
exports[`invalid-for-in.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-in statement. (1:6)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^
|
||||
@@ -306,7 +306,7 @@ exports[`invalid-for-in.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [espree] format 1`] = `
|
||||
exports[`invalid-for-in.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^
|
||||
@@ -314,7 +314,7 @@ exports[`invalid-for-in.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [meriyah] format 1`] = `
|
||||
exports[`invalid-for-in.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in for-in (1:11)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^^
|
||||
@@ -322,14 +322,14 @@ exports[`invalid-for-in.js [meriyah] format 1`] = `
|
||||
Cause: [1:10-1:12]: Invalid left-hand side in for-in"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-in.js [oxc] format 1`] = `
|
||||
exports[`invalid-for-in.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:6)
|
||||
> 1 | for (a?.b in x);
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-for-of.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -337,7 +337,7 @@ exports[`invalid-for-of.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [acorn] format 1`] = `
|
||||
exports[`invalid-for-of.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -345,7 +345,7 @@ exports[`invalid-for-of.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [babel] format 1`] = `
|
||||
exports[`invalid-for-of.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -353,7 +353,7 @@ exports[`invalid-for-of.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [espree] format 1`] = `
|
||||
exports[`invalid-for-of.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^
|
||||
@@ -361,7 +361,7 @@ exports[`invalid-for-of.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [meriyah] format 1`] = `
|
||||
exports[`invalid-for-of.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in for-of (1:11)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^^
|
||||
@@ -369,14 +369,14 @@ exports[`invalid-for-of.js [meriyah] format 1`] = `
|
||||
Cause: [1:10-1:12]: Invalid left-hand side in for-of"
|
||||
`;
|
||||
|
||||
exports[`invalid-for-of.js [oxc] format 1`] = `
|
||||
exports[`invalid-for-of.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:6)
|
||||
> 1 | for (a?.b of x);
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
|
||||
> 1 | a?.b++;
|
||||
| ^
|
||||
@@ -384,7 +384,7 @@ exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [acorn] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b++;
|
||||
| ^
|
||||
@@ -392,7 +392,7 @@ exports[`invalid-inc-postfix.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:0)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [babel] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
|
||||
> 1 | a?.b++;
|
||||
| ^
|
||||
@@ -400,7 +400,7 @@ exports[`invalid-inc-postfix.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [espree] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b++;
|
||||
| ^
|
||||
@@ -408,7 +408,7 @@ exports[`invalid-inc-postfix.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [meriyah] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[meriyah] 1`] = `
|
||||
"Invalid increment/decrement operand (1:5)
|
||||
> 1 | a?.b++;
|
||||
| ^^
|
||||
@@ -416,14 +416,14 @@ exports[`invalid-inc-postfix.js [meriyah] format 1`] = `
|
||||
Cause: [1:4-1:6]: Invalid increment/decrement operand"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-postfix.js [oxc] format 1`] = `
|
||||
exports[`invalid-inc-postfix.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:1)
|
||||
> 1 | a?.b++;
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[__babel_estree] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of prefix operation. (1:3)
|
||||
> 1 | ++a?.b;
|
||||
| ^
|
||||
@@ -431,7 +431,7 @@ exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [acorn] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:3)
|
||||
> 1 | ++a?.b;
|
||||
| ^
|
||||
@@ -439,7 +439,7 @@ exports[`invalid-inc-prefix.js [acorn] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:2)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [babel] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[babel] 1`] = `
|
||||
"Invalid optional chaining in the left-hand side of prefix operation. (1:3)
|
||||
> 1 | ++a?.b;
|
||||
| ^
|
||||
@@ -447,7 +447,7 @@ exports[`invalid-inc-prefix.js [babel] format 1`] = `
|
||||
Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [espree] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:3)
|
||||
> 1 | ++a?.b;
|
||||
| ^
|
||||
@@ -455,7 +455,7 @@ exports[`invalid-inc-prefix.js [espree] format 1`] = `
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [meriyah] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[meriyah] 1`] = `
|
||||
"Invalid increment/decrement operand (1:7)
|
||||
> 1 | ++a?.b;
|
||||
| ^
|
||||
@@ -463,48 +463,13 @@ exports[`invalid-inc-prefix.js [meriyah] format 1`] = `
|
||||
Cause: [1:6-1:7]: Invalid increment/decrement operand"
|
||||
`;
|
||||
|
||||
exports[`invalid-inc-prefix.js [oxc] format 1`] = `
|
||||
exports[`invalid-inc-prefix.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:3)
|
||||
> 1 | ++a?.b;
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js [acorn] format 1`] = `
|
||||
"The keyword 'let' is reserved (1:1)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: The keyword 'let' is reserved (1:0)"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js [espree] format 1`] = `
|
||||
"The keyword 'let' is reserved (1:1)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js [meriyah] format 1`] = `
|
||||
"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:4)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^^
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: [1:3-1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js [oxc] format 1`] = `
|
||||
"Cannot assign to this expression (1:1)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^^^^^^^^^^
|
||||
2 | let?.[a] = 1;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -521,27 +486,39 @@ let?.[a] = 1;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-eq.js [acorn] format 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c = d;
|
||||
exports[`valid-complex-case.js format[acorn] 1`] = `
|
||||
"The keyword 'let' is reserved (1:1)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:0)"
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: The keyword 'let' is reserved (1:0)"
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-eq.js [espree] format 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c = d;
|
||||
exports[`valid-complex-case.js format[espree] 1`] = `
|
||||
"The keyword 'let' is reserved (1:1)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: The keyword 'let' is reserved"
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-eq.js [oxc] format 1`] = `
|
||||
exports[`valid-complex-case.js format[meriyah] 1`] = `
|
||||
"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:4)
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^^
|
||||
2 | let?.[a] = 1;
|
||||
3 |
|
||||
Cause: [1:3-1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode"
|
||||
`;
|
||||
|
||||
exports[`valid-complex-case.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:1)
|
||||
> 1 | a?.b.c = d;
|
||||
| ^^^^^^
|
||||
2 |"
|
||||
> 1 | let?.()[a] =1;
|
||||
| ^^^^^^^^^^
|
||||
2 | let?.[a] = 1;
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-eq.js format 1`] = `
|
||||
@@ -558,25 +535,25 @@ a?.b.c = d;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-plus-eq.js [acorn] format 1`] = `
|
||||
exports[`valid-lhs-eq.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
> 1 | a?.b.c = d;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:0)"
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-plus-eq.js [espree] format 1`] = `
|
||||
exports[`valid-lhs-eq.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
> 1 | a?.b.c = d;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`valid-lhs-plus-eq.js [oxc] format 1`] = `
|
||||
exports[`valid-lhs-eq.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
> 1 | a?.b.c = d;
|
||||
| ^^^^^^
|
||||
2 |"
|
||||
`;
|
||||
@@ -595,34 +572,26 @@ a?.b.c += d;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js [acorn] format 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
exports[`valid-lhs-plus-eq.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:1)"
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:0)"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js [espree] format 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
exports[`valid-lhs-plus-eq.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js [meriyah] format 1`] = `
|
||||
"Invalid left-hand side in assignment (1:8)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:7-1:8]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js [oxc] format 1`] = `
|
||||
"Cannot assign to this expression (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^^^^
|
||||
exports[`valid-lhs-plus-eq.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:1)
|
||||
> 1 | a?.b.c += d;
|
||||
| ^^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
@@ -639,3 +608,34 @@ a?.b = c;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js format[acorn] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side (1:1)"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js format[espree] 1`] = `
|
||||
"Optional chaining cannot appear in left-hand side (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
2 |
|
||||
Cause: Optional chaining cannot appear in left-hand side"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js format[meriyah] 1`] = `
|
||||
"Invalid left-hand side in assignment (1:8)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:7-1:8]: Invalid left-hand side in assignment"
|
||||
`;
|
||||
|
||||
exports[`valid-parenthesized.js format[oxc] 1`] = `
|
||||
"Cannot assign to this expression (1:2)
|
||||
> 1 | (a?.b) = c;
|
||||
| ^^^^
|
||||
2 |"
|
||||
`;
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`test.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`test.js [espree] format 1`] = `
|
||||
"Unexpected token ? (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: Unexpected token ?"
|
||||
`;
|
||||
|
||||
exports[`test.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '?' (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: [1:22-1:23]: Unexpected token: '?'"
|
||||
`;
|
||||
|
||||
exports[`test.js [oxc] format 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right"
|
||||
`;
|
||||
|
||||
exports[`test.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -68,3 +29,42 @@ let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack,
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`test.js format[espree] 1`] = `
|
||||
"Unexpected token ? (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: Unexpected token ?"
|
||||
`;
|
||||
|
||||
exports[`test.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '?' (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right
|
||||
Cause: [1:22-1:23]: Unexpected token: '?'"
|
||||
`;
|
||||
|
||||
exports[`test.js format[oxc] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | const addOne = add(1, ?); // apply from the left
|
||||
| ^
|
||||
2 | addOne(2); // 3
|
||||
3 |
|
||||
4 | const addTen = add(?, 10); // apply from the right"
|
||||
`;
|
||||
@@ -1,48 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`block-comments.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`block-comments.js [espree] format 1`] = `
|
||||
"Unexpected token > (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`block-comments.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '>' (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: [2:1-2:2]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`block-comments.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave"
|
||||
`;
|
||||
|
||||
exports[`block-comments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -67,47 +24,47 @@ bifornCringerMoshedPerplexSawder
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`fsharp_style_pipeline_operator.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
Cause: Unexpected token (2:3)"
|
||||
exports[`block-comments.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: Unexpected token (2:1)"
|
||||
`;
|
||||
|
||||
exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = `
|
||||
"Unexpected token > (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
exports[`block-comments.js format[espree] 1`] = `
|
||||
"Unexpected token > (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '>' (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
Cause: [2:3-2:4]: Unexpected token: '>'"
|
||||
exports[`block-comments.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '>' (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave
|
||||
Cause: [2:1-2:2]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`fsharp_style_pipeline_operator.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'"
|
||||
exports[`block-comments.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:2)
|
||||
1 | bifornCringerMoshedPerplexSawder
|
||||
> 2 | |> foo1
|
||||
| ^
|
||||
3 | |> foo2 /* comment1 */
|
||||
4 | |> foo3 /* comment2 */
|
||||
5 | |> kochabCooieGameOnOboleUnweave"
|
||||
`;
|
||||
|
||||
exports[`fsharp_style_pipeline_operator.js format 1`] = `
|
||||
@@ -205,43 +162,47 @@ const f = x |> (f) => f |> f;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`hack_pipeline_operator.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> await % |> % * 3;
|
||||
exports[`fsharp_style_pipeline_operator.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
2 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
Cause: Unexpected token (1:3)"
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
Cause: Unexpected token (2:3)"
|
||||
`;
|
||||
|
||||
exports[`hack_pipeline_operator.js [espree] format 1`] = `
|
||||
"Unexpected token > (1:4)
|
||||
> 1 | a |> await % |> % * 3;
|
||||
exports[`fsharp_style_pipeline_operator.js format[espree] 1`] = `
|
||||
"Unexpected token > (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
2 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`hack_pipeline_operator.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '>' (1:4)
|
||||
> 1 | a |> await % |> % * 3;
|
||||
exports[`fsharp_style_pipeline_operator.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '>' (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
2 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
Cause: [1:3-1:4]: Unexpected token: '>'"
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'
|
||||
Cause: [2:3-2:4]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`hack_pipeline_operator.js [oxc] format 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> await % |> % * 3;
|
||||
exports[`fsharp_style_pipeline_operator.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | promise
|
||||
> 2 | |> await
|
||||
| ^
|
||||
2 |
|
||||
3 | foo
|
||||
4 | |> await %"
|
||||
3 | |> x => doubleSay(x, ', ')
|
||||
4 | |> capitalize
|
||||
5 | |> x => x + '!'"
|
||||
`;
|
||||
|
||||
exports[`hack_pipeline_operator.js format 1`] = `
|
||||
@@ -358,43 +319,43 @@ async function* f() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js [acorn] format 1`] = `
|
||||
exports[`hack_pipeline_operator.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
> 1 | a |> await % |> % * 3;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
Cause: Unexpected token (1:3)"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js [espree] format 1`] = `
|
||||
exports[`hack_pipeline_operator.js format[espree] 1`] = `
|
||||
"Unexpected token > (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
> 1 | a |> await % |> % * 3;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js [meriyah] format 1`] = `
|
||||
exports[`hack_pipeline_operator.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '>' (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
> 1 | a |> await % |> % * 3;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
3 | foo
|
||||
4 | |> await %
|
||||
Cause: [1:3-1:4]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js [oxc] format 1`] = `
|
||||
exports[`hack_pipeline_operator.js format[oxc] 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
> 1 | a |> await % |> % * 3;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |"
|
||||
3 | foo
|
||||
4 | |> await %"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js format 1`] = `
|
||||
@@ -507,3 +468,42 @@ const result2 = [4, 9].map((x) => x |> inc |> double);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
Cause: Unexpected token (1:3)"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js format[espree] 1`] = `
|
||||
"Unexpected token > (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
Cause: Unexpected token >"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '>' (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |
|
||||
Cause: [1:3-1:4]: Unexpected token: '>'"
|
||||
`;
|
||||
|
||||
exports[`minimal_pipeline_operator.js format[oxc] 1`] = `
|
||||
"Unexpected token (1:4)
|
||||
> 1 | a |> b |> c;
|
||||
| ^
|
||||
2 |
|
||||
3 | a |> (b |> c);
|
||||
4 |"
|
||||
`;
|
||||
@@ -1,15 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`private-in.js [espree] format 1`] = `
|
||||
"Unexpected token #prop (1:5)
|
||||
> 1 | if (#prop in obj) {
|
||||
| ^
|
||||
2 | }
|
||||
3 |
|
||||
4 | #prop in obj;
|
||||
Cause: Unexpected token #prop"
|
||||
`;
|
||||
|
||||
exports[`private-in.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -49,3 +39,13 @@ if (#prop in obj) {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`private-in.js format[espree] 1`] = `
|
||||
"Unexpected token #prop (1:5)
|
||||
> 1 | if (#prop in obj) {
|
||||
| ^
|
||||
2 | }
|
||||
3 |
|
||||
4 | #prop in obj;
|
||||
Cause: Unexpected token #prop"
|
||||
`;
|
||||
@@ -19,19 +19,6 @@ function foo() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`eval-arguments.js [hermes] format 1`] = `
|
||||
"invalid assignment left-hand side (3:2)
|
||||
1 | function myfunc() {
|
||||
2 | eval = 1
|
||||
> 3 | arguments = arguments;
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: invalid assignment left-hand side (3:2)
|
||||
arguments = arguments;
|
||||
^~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`eval-arguments.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -52,6 +39,19 @@ function myfunc() {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`eval-arguments.js format[hermes] 1`] = `
|
||||
"invalid assignment left-hand side (3:2)
|
||||
1 | function myfunc() {
|
||||
2 | eval = 1
|
||||
> 3 | arguments = arguments;
|
||||
| ^
|
||||
4 | }
|
||||
5 |
|
||||
Cause: invalid assignment left-hand side (3:2)
|
||||
arguments = arguments;
|
||||
^~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`eval-arguments-binding.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -86,47 +86,6 @@ if (false) function foo() {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js [espree] format 1`] = `
|
||||
"Unexpected token function (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token function"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js [flow] format 1`] = `
|
||||
"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js [hermes] format 1`] = `
|
||||
"declaration not allowed as expression statement (1:14)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: declaration not allowed as expression statement (1:14)
|
||||
while (false) function foo(){}
|
||||
^~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js [meriyah] format 1`] = `
|
||||
"In strict mode code, functions can only be declared at top level or inside a block (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^^^^^^^^
|
||||
2 |
|
||||
Cause: [1:14-1:22]: In strict mode code, functions can only be declared at top level or inside a block"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -141,14 +100,45 @@ while (false) function foo() {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`labeled-function-declaration.js [hermes] format 1`] = `
|
||||
"Function declaration not allowed as body of labeled statement (1:5)
|
||||
> 1 | foo: function bar() {}
|
||||
| ^
|
||||
exports[`function-declaration-in-while.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Function declaration not allowed as body of labeled statement (1:5)
|
||||
foo: function bar() {}
|
||||
^"
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js format[espree] 1`] = `
|
||||
"Unexpected token function (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token function"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js format[flow] 1`] = `
|
||||
"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js format[hermes] 1`] = `
|
||||
"declaration not allowed as expression statement (1:14)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^
|
||||
2 |
|
||||
Cause: declaration not allowed as expression statement (1:14)
|
||||
while (false) function foo(){}
|
||||
^~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`function-declaration-in-while.js format[meriyah] 1`] = `
|
||||
"In strict mode code, functions can only be declared at top level or inside a block (1:15)
|
||||
> 1 | while (false) function foo(){}
|
||||
| ^^^^^^^^
|
||||
2 |
|
||||
Cause: [1:14-1:22]: In strict mode code, functions can only be declared at top level or inside a block"
|
||||
`;
|
||||
|
||||
exports[`labeled-function-declaration.js format 1`] = `
|
||||
@@ -164,3 +154,13 @@ foo: function bar() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`labeled-function-declaration.js format[hermes] 1`] = `
|
||||
"Function declaration not allowed as body of labeled statement (1:5)
|
||||
> 1 | foo: function bar() {}
|
||||
| ^
|
||||
2 |
|
||||
Cause: Function declaration not allowed as body of labeled statement (1:5)
|
||||
foo: function bar() {}
|
||||
^"
|
||||
`;
|
||||
@@ -14,30 +14,6 @@ import source from "x";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`import-source.js [espree] format 1`] = `
|
||||
"Unexpected token x (1:15)
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`import-source.js [meriyah] format 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:14-1:15]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -52,25 +28,25 @@ import source x from "x";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-declaration.js [acorn] format 1`] = `
|
||||
exports[`import-source.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-declaration.js [espree] format 1`] = `
|
||||
"Unexpected token s (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
exports[`import-source.js format[espree] 1`] = `
|
||||
"Unexpected token x (1:15)
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token s"
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-declaration.js [meriyah] format 1`] = `
|
||||
exports[`import-source.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
> 1 | import source x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:14-1:15]: Expected 'from'"
|
||||
@@ -90,28 +66,28 @@ import source s from "x" with { attr: "val" };
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-expression.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
exports[`import-source-attributes-declaration.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-expression.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
exports[`import-source-attributes-declaration.js format[espree] 1`] = `
|
||||
"Unexpected token s (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
Cause: Unexpected token s"
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-expression.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^^^^^^
|
||||
exports[`import-source-attributes-declaration.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source s from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
Cause: [1:14-1:15]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`import-source-attributes-expression.js format 1`] = `
|
||||
@@ -128,28 +104,28 @@ import.source("x", { with: { attr: "val" } });
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-from.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^
|
||||
exports[`import-source-attributes-expression.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:19)"
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-from.js [espree] format 1`] = `
|
||||
"Unexpected token from (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^
|
||||
exports[`import-source-attributes-expression.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token from"
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-from.js [meriyah] format 1`] = `
|
||||
"Import source must be string (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^^^^
|
||||
exports[`import-source-attributes-expression.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("x", { with: { attr: "val" } });
|
||||
| ^^^^^^
|
||||
2 |
|
||||
Cause: [1:19-1:23]: Import source must be string"
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-from.js format 1`] = `
|
||||
@@ -166,28 +142,28 @@ import source from from "x";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-source.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^
|
||||
exports[`import-source-binding-from.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:14)"
|
||||
Cause: Unexpected token (1:19)"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-source.js [espree] format 1`] = `
|
||||
"Unexpected token source (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^
|
||||
exports[`import-source-binding-from.js format[espree] 1`] = `
|
||||
"Unexpected token from (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token source"
|
||||
Cause: Unexpected token from"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-source.js [meriyah] format 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^^^^^^
|
||||
exports[`import-source-binding-from.js format[meriyah] 1`] = `
|
||||
"Import source must be string (1:20)
|
||||
> 1 | import source from from "x";
|
||||
| ^^^^
|
||||
2 |
|
||||
Cause: [1:14-1:20]: Expected 'from'"
|
||||
Cause: [1:19-1:23]: Import source must be string"
|
||||
`;
|
||||
|
||||
exports[`import-source-binding-source.js format 1`] = `
|
||||
@@ -204,28 +180,28 @@ import source source from "x";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js [acorn] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^
|
||||
exports[`import-source-binding-source.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js [espree] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^
|
||||
exports[`import-source-binding-source.js format[espree] 1`] = `
|
||||
"Unexpected token source (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
Cause: Unexpected token source"
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js [meriyah] format 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^^^^^^
|
||||
exports[`import-source-binding-source.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source source from "x";
|
||||
| ^^^^^^
|
||||
2 |
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
Cause: [1:14-1:20]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js format 1`] = `
|
||||
@@ -242,7 +218,31 @@ import.source("foo");
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-named.js [__babel_estree] format 1`] = `
|
||||
exports[`import-source-dynamic-import.js format[acorn] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta' (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js format[espree] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source-dynamic-import.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.source("foo");
|
||||
| ^^^^^^
|
||||
2 |
|
||||
Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[__babel_estree] 1`] = `
|
||||
"Only \`import source x from "./module"\` is valid. (1:17)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^
|
||||
@@ -250,7 +250,7 @@ exports[`no-named.js [__babel_estree] format 1`] = `
|
||||
Cause: Only \`import source x from "./module"\` is valid. (1:16)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [acorn] format 1`] = `
|
||||
exports[`no-named.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^
|
||||
@@ -258,7 +258,7 @@ exports[`no-named.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [babel] format 1`] = `
|
||||
exports[`no-named.js format[babel] 1`] = `
|
||||
"Only \`import source x from "./module"\` is valid. (1:17)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^
|
||||
@@ -266,7 +266,7 @@ exports[`no-named.js [babel] format 1`] = `
|
||||
Cause: Only \`import source x from "./module"\` is valid. (1:16)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [espree] format 1`] = `
|
||||
exports[`no-named.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:15)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^
|
||||
@@ -274,7 +274,7 @@ exports[`no-named.js [espree] format 1`] = `
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [meriyah] format 1`] = `
|
||||
exports[`no-named.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^
|
||||
@@ -282,14 +282,14 @@ exports[`no-named.js [meriyah] format 1`] = `
|
||||
Cause: [1:14-1:15]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-named.js [oxc] format 1`] = `
|
||||
exports[`no-named.js format[oxc] 1`] = `
|
||||
"Only a single default import is allowed in a source phase import. (1:8)
|
||||
> 1 | import source { x } from "x";
|
||||
| ^^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [__babel_estree] format 1`] = `
|
||||
exports[`no-namespace.js format[__babel_estree] 1`] = `
|
||||
"Only \`import source x from "./module"\` is valid. (1:15)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^
|
||||
@@ -297,7 +297,7 @@ exports[`no-namespace.js [__babel_estree] format 1`] = `
|
||||
Cause: Only \`import source x from "./module"\` is valid. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [acorn] format 1`] = `
|
||||
exports[`no-namespace.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^
|
||||
@@ -305,7 +305,7 @@ exports[`no-namespace.js [acorn] format 1`] = `
|
||||
Cause: Unexpected token (1:14)"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [babel] format 1`] = `
|
||||
exports[`no-namespace.js format[babel] 1`] = `
|
||||
"Only \`import source x from "./module"\` is valid. (1:15)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^
|
||||
@@ -313,7 +313,7 @@ exports[`no-namespace.js [babel] format 1`] = `
|
||||
Cause: Only \`import source x from "./module"\` is valid. (1:14)"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [espree] format 1`] = `
|
||||
exports[`no-namespace.js format[espree] 1`] = `
|
||||
"Unexpected token * (1:15)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^
|
||||
@@ -321,7 +321,7 @@ exports[`no-namespace.js [espree] format 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [meriyah] format 1`] = `
|
||||
exports[`no-namespace.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:15)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^
|
||||
@@ -329,7 +329,7 @@ exports[`no-namespace.js [meriyah] format 1`] = `
|
||||
Cause: [1:14-1:15]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-namespace.js [oxc] format 1`] = `
|
||||
exports[`no-namespace.js format[oxc] 1`] = `
|
||||
"Only a single default import is allowed in a source phase import. (1:8)
|
||||
> 1 | import source * as x from "x";
|
||||
| ^^^^^^
|
||||
|
||||
@@ -126,42 +126,6 @@ const loremIpsumFooBazBar2 =
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: Invalid escape sequence (3:2)"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: Invalid escape sequence"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [meriyah] format 1`] = `
|
||||
"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow"]
|
||||
@@ -189,7 +153,7 @@ trailingComma: "all"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1`] = `
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[acorn] 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
@@ -201,7 +165,7 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1`
|
||||
Cause: Invalid escape sequence (3:2)"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1`] = `
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[espree] 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
@@ -213,7 +177,7 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1
|
||||
Cause: Invalid escape sequence"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [meriyah] format 1`] = `
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[meriyah] 1`] = `
|
||||
"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
@@ -252,6 +216,42 @@ trailingComma: "es5"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[acorn] 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: Invalid escape sequence (3:2)"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[espree] 1`] = `
|
||||
"Invalid escape sequence (3:3)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: Invalid escape sequence"
|
||||
`;
|
||||
|
||||
exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[meriyah] 1`] = `
|
||||
"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11852
|
||||
2 |
|
||||
> 3 | "\\8","\\9";
|
||||
| ^^
|
||||
4 | () => {
|
||||
5 | "use strict";
|
||||
6 | "\\8", "\\9";
|
||||
Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes"
|
||||
`;
|
||||
|
||||
exports[`strings.js - {"trailingComma":"all"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow"]
|
||||
|
||||
@@ -1,44 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`throw_expression.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: Unexpected token (1:25)"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js [espree] format 1`] = `
|
||||
"Unexpected token throw (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: Unexpected token throw"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'throw' (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^^^^^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: [1:25-1:30]: Unexpected token: 'throw'"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js [oxc] format 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^^^^^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -92,3 +53,42 @@ class Product {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: Unexpected token (1:25)"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js format[espree] 1`] = `
|
||||
"Unexpected token throw (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: Unexpected token throw"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'throw' (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^^^^^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")
|
||||
Cause: [1:25-1:30]: Unexpected token: 'throw'"
|
||||
`;
|
||||
|
||||
exports[`throw_expression.js format[oxc] 1`] = `
|
||||
"Unexpected token (1:26)
|
||||
> 1 | function save(filename = throw new TypeError("Argument required")) {}
|
||||
| ^^^^^
|
||||
2 |
|
||||
3 | lint(ast, {
|
||||
4 | with: () => throw new Error("avoid using 'with' statements.")"
|
||||
`;
|
||||
@@ -1,40 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`avoid-conflicts-to-pipeline.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: Unexpected token (2:15)"
|
||||
`;
|
||||
|
||||
exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = `
|
||||
"Unexpected token % (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: Unexpected token %"
|
||||
`;
|
||||
|
||||
exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '%' (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: [2:15-2:16]: Unexpected token: '%'"
|
||||
`;
|
||||
|
||||
exports[`avoid-conflicts-to-pipeline.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`avoid-conflicts-to-pipeline.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -51,47 +16,39 @@ const status = %GetOptimizationStatus(fn);
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
Cause: Unexpected token (2:12)"
|
||||
exports[`avoid-conflicts-to-pipeline.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: Unexpected token (2:15)"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js [espree] format 1`] = `
|
||||
"Unexpected token % (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
exports[`avoid-conflicts-to-pipeline.js format[espree] 1`] = `
|
||||
"Unexpected token % (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: Unexpected token %"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js [meriyah] format 1`] = `
|
||||
"Unexpected token: '%' (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
Cause: [2:12-2:13]: Unexpected token: '%'"
|
||||
exports[`avoid-conflicts-to-pipeline.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '%' (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |
|
||||
Cause: [2:15-2:16]: Unexpected token: '%'"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }"
|
||||
exports[`avoid-conflicts-to-pipeline.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:16)
|
||||
1 | // |>
|
||||
> 2 | const status = %GetOptimizationStatus(fn);
|
||||
| ^
|
||||
3 |"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js format 1`] = `
|
||||
@@ -139,3 +96,46 @@ function printFunc(f) {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
Cause: Unexpected token (2:12)"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js format[espree] 1`] = `
|
||||
"Unexpected token % (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
Cause: Unexpected token %"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js format[meriyah] 1`] = `
|
||||
"Unexpected token: '%' (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }
|
||||
Cause: [2:12-2:13]: Unexpected token: '%'"
|
||||
`;
|
||||
|
||||
exports[`intrinsic_call.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:13)
|
||||
1 | function doSmth() {
|
||||
> 2 | %DebugPrint
|
||||
| ^
|
||||
3 | (
|
||||
4 | foo )
|
||||
5 | }"
|
||||
`;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,32 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [json] format 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [json-stringify] format 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [json5] format 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["jsonc", "json", "json5", "json-stringify"]
|
||||
@@ -45,3 +18,30 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[json] 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[json-stringify] 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[json5] 1`] = `
|
||||
"The input is empty or contains only comments. (4:29)
|
||||
2 | /** Block comment 1 */
|
||||
3 | // Line comment 2
|
||||
> 4 | /** Block comment 3 */
|
||||
| ^
|
||||
Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
|
||||
`;
|
||||
@@ -1,476 +1,476 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[oxc-ts] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
|
||||
> 1 | let x1 = <div>}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token. Did you mean \`{'}'}\` or \`}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #1 format[oxc-ts] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
|
||||
> 1 | let x2 = <div>></div>;
|
||||
| ^
|
||||
Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
exports[`snippet: #2 format[babel] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
exports[`snippet: #2 format[espree] 1`] = `
|
||||
"Unexpected token < (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^
|
||||
Cause: Unexpected token <"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
exports[`snippet: #2 format[flow] 1`] = `
|
||||
"Unexpected token \`<\`, expected the token \`>\` (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #2 format[oxc-ts] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
exports[`snippet: #2 format[typescript] 1`] = `
|
||||
"Identifier expected. (1:16)
|
||||
> 1 | let x2 = <div><</div>;
|
||||
| ^
|
||||
Cause: Identifier expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
exports[`snippet: #3 format[acorn] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
exports[`snippet: #3 format[babel] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
exports[`snippet: #3 format[espree] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
exports[`snippet: #3 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:22)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #3 format[oxc-ts] 1`] = `
|
||||
"Expected \`:\` but found \`}\` (1:21)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 1`] = `
|
||||
exports[`snippet: #3 format[typescript] 1`] = `
|
||||
"':' expected. (1:21)
|
||||
> 1 | let x3 = <div>{"foo"}}</div>;
|
||||
| ^
|
||||
Cause: ':' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
exports[`snippet: #4 format[acorn] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
exports[`snippet: #4 format[babel] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #4 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:21)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
exports[`snippet: #4 format[espree] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 1`] = `
|
||||
exports[`snippet: #4 format[flow] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [oxc] format 1`] = `
|
||||
exports[`snippet: #4 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:22)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #4 format[oxc-ts] 1`] = `
|
||||
"Expected \`:\` but found \`}\` (1:21)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 1`] = `
|
||||
exports[`snippet: #4 format[typescript] 1`] = `
|
||||
"':' expected. (1:21)
|
||||
> 1 | let x4 = <div>{"foo"}></div>;
|
||||
| ^
|
||||
Cause: ':' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [acorn] format 1`] = `
|
||||
exports[`snippet: #5 format[acorn] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel] format 1`] = `
|
||||
exports[`snippet: #5 format[babel] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #5 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:22)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [espree] format 1`] = `
|
||||
exports[`snippet: #5 format[espree] 1`] = `
|
||||
"Unexpected token < (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^
|
||||
Cause: Unexpected token <"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [flow] format 1`] = `
|
||||
exports[`snippet: #5 format[flow] 1`] = `
|
||||
"Unexpected token \`<\`, expected the token \`>\` (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [oxc] format 1`] = `
|
||||
exports[`snippet: #5 format[oxc] 1`] = `
|
||||
"Unexpected token (1:23)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #5 format[oxc-ts] 1`] = `
|
||||
"Expected \`:\` but found \`}\` (1:21)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [typescript] format 1`] = `
|
||||
exports[`snippet: #5 format[typescript] 1`] = `
|
||||
"':' expected. (1:21)
|
||||
> 1 | let x4 = <div>{"foo"}<</div>;
|
||||
| ^
|
||||
Cause: ':' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [acorn] format 1`] = `
|
||||
exports[`snippet: #6 format[acorn] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [babel] format 1`] = `
|
||||
exports[`snippet: #6 format[babel] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #6 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [espree] format 1`] = `
|
||||
exports[`snippet: #6 format[espree] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [flow] format 1`] = `
|
||||
exports[`snippet: #6 format[flow] 1`] = `
|
||||
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [oxc] format 1`] = `
|
||||
exports[`snippet: #6 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #6 format[oxc-ts] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #6 [typescript] format 1`] = `
|
||||
exports[`snippet: #6 format[typescript] 1`] = `
|
||||
"Expression expected. (1:15)
|
||||
> 1 | let x5 = <div>}{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Expression expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [acorn] format 1`] = `
|
||||
exports[`snippet: #7 format[acorn] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [babel] format 1`] = `
|
||||
exports[`snippet: #7 format[babel] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #7 format[babel-ts] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [espree] format 1`] = `
|
||||
exports[`snippet: #7 format[espree] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [flow] format 1`] = `
|
||||
exports[`snippet: #7 format[flow] 1`] = `
|
||||
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [oxc] format 1`] = `
|
||||
exports[`snippet: #7 format[oxc] 1`] = `
|
||||
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #7 format[oxc-ts] 1`] = `
|
||||
"Unexpected token (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #7 [typescript] format 1`] = `
|
||||
exports[`snippet: #7 format[typescript] 1`] = `
|
||||
"Expression expected. (1:15)
|
||||
> 1 | let x6 = <div>>{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Expression expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [acorn] format 1`] = `
|
||||
exports[`snippet: #8 format[acorn] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [babel] format 1`] = `
|
||||
exports[`snippet: #8 format[babel] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #8 format[babel-ts] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [espree] format 1`] = `
|
||||
exports[`snippet: #8 format[espree] 1`] = `
|
||||
"Unexpected token { (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [flow] format 1`] = `
|
||||
exports[`snippet: #8 format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the token \`>\` (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [oxc] format 1`] = `
|
||||
exports[`snippet: #8 format[oxc] 1`] = `
|
||||
"Unexpected token (1:16)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [oxc-ts] format 1`] = `
|
||||
exports[`snippet: #8 format[oxc-ts] 1`] = `
|
||||
"Expected \`>\` but found \`<\` (1:23)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #8 [typescript] format 1`] = `
|
||||
exports[`snippet: #8 format[typescript] 1`] = `
|
||||
"'>' expected. (1:23)
|
||||
> 1 | let x6 = <div><{"foo"}</div>;
|
||||
| ^
|
||||
|
||||
+4
-4
@@ -1,20 +1,20 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:18)
|
||||
> 1 | let x1 = <div>{a,b}</div>
|
||||
| ^
|
||||
Cause: Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:17)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:18)
|
||||
> 1 | let x1 = <div>{a,b}</div>
|
||||
| ^
|
||||
Cause: Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:17)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"'}' expected in JSX child expression (1:16)
|
||||
> 1 | let x1 = <div>{a,b}</div>
|
||||
| ^
|
||||
@@ -23,7 +23,7 @@ let x1 = <div>{a,b}</div>
|
||||
~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Expected '}' (1:17)
|
||||
> 1 | let x1 = <div>{a,b}</div>
|
||||
| ^
|
||||
|
||||
@@ -83,17 +83,6 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = `
|
||||
"Identifier expected. (2:6)
|
||||
1 | /* =========== before slash =========== */
|
||||
> 2 | <a><// line
|
||||
| ^
|
||||
3 | /a>;
|
||||
4 | <a></* block */
|
||||
5 | /a>;
|
||||
Cause: Identifier expected."
|
||||
`;
|
||||
|
||||
exports[`in-end-tag.js - {"bracketSameLine":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
bracketSameLine: true
|
||||
@@ -212,6 +201,17 @@ a>;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`in-end-tag.js - {"bracketSameLine":true} format[typescript] 1`] = `
|
||||
"Identifier expected. (2:6)
|
||||
1 | /* =========== before slash =========== */
|
||||
> 2 | <a><// line
|
||||
| ^
|
||||
3 | /a>;
|
||||
4 | <a></* block */
|
||||
5 | /a>;
|
||||
Cause: Identifier expected."
|
||||
`;
|
||||
|
||||
exports[`in-tags.js - {"bracketSameLine":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
bracketSameLine: true
|
||||
|
||||
@@ -1,48 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`do.js [acorn] format 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: Unexpected token (2:3)"
|
||||
`;
|
||||
|
||||
exports[`do.js [espree] format 1`] = `
|
||||
"Unexpected token do (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`do.js [meriyah] format 1`] = `
|
||||
"Unexpected token: 'do' (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: [2:3-2:5]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`do.js [oxc] format 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>"
|
||||
`;
|
||||
|
||||
exports[`do.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -64,3 +21,46 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`do.js format[acorn] 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: Unexpected token (2:3)"
|
||||
`;
|
||||
|
||||
exports[`do.js format[espree] 1`] = `
|
||||
"Unexpected token do (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: Unexpected token do"
|
||||
`;
|
||||
|
||||
exports[`do.js format[meriyah] 1`] = `
|
||||
"Unexpected token: 'do' (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>
|
||||
Cause: [2:3-2:5]: Unexpected token: 'do'"
|
||||
`;
|
||||
|
||||
exports[`do.js format[oxc] 1`] = `
|
||||
"Unexpected token (2:4)
|
||||
1 | <div>
|
||||
> 2 | {do {
|
||||
| ^^
|
||||
3 | 1
|
||||
4 | }}
|
||||
5 | </div>"
|
||||
`;
|
||||
@@ -73,26 +73,6 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`child.js [acorn] format 1`] = `
|
||||
"Unexpected token (1:7)
|
||||
> 1 | <div>{...a}</div>;
|
||||
| ^
|
||||
2 |
|
||||
3 | <div>{...a /* comment */}</div>;
|
||||
4 |
|
||||
Cause: Unexpected token (1:6)"
|
||||
`;
|
||||
|
||||
exports[`child.js [espree] format 1`] = `
|
||||
"Unexpected token ... (1:7)
|
||||
> 1 | <div>{...a}</div>;
|
||||
| ^
|
||||
2 |
|
||||
3 | <div>{...a /* comment */}</div>;
|
||||
4 |
|
||||
Cause: Unexpected token ..."
|
||||
`;
|
||||
|
||||
exports[`child.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
@@ -157,3 +137,23 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`child.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:7)
|
||||
> 1 | <div>{...a}</div>;
|
||||
| ^
|
||||
2 |
|
||||
3 | <div>{...a /* comment */}</div>;
|
||||
4 |
|
||||
Cause: Unexpected token (1:6)"
|
||||
`;
|
||||
|
||||
exports[`child.js format[espree] 1`] = `
|
||||
"Unexpected token ... (1:7)
|
||||
> 1 | <div>{...a}</div>;
|
||||
| ^
|
||||
2 |
|
||||
3 | <div>{...a /* comment */}</div>;
|
||||
4 |
|
||||
Cause: Unexpected token ..."
|
||||
`;
|
||||
@@ -32,7 +32,7 @@ exports[`open-sigle-quote.less format 1`] = `
|
||||
Cause: <css input>:2:17: Unclosed string"
|
||||
`;
|
||||
|
||||
exports[`scss-syntax.scss format 1`] = `
|
||||
exports[`scss-syntax.unknown format 1`] = `
|
||||
"CssSyntaxError: Unknown word $foo (1:15)
|
||||
> 1 | a {content: #{$foo}}
|
||||
| ^
|
||||
|
||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: Should not support front matter [__babel_estree] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__babel_estree] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -9,7 +9,7 @@ exports[`snippet: Should not support front matter [__babel_estree] format 1`] =
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__js_expression] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__js_expression] 1`] = `
|
||||
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -18,7 +18,7 @@ exports[`snippet: Should not support front matter [__js_expression] format 1`] =
|
||||
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__ng_action] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__ng_action] 1`] = `
|
||||
"Parser Error: Unexpected token 'Matter' (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -30,7 +30,7 @@ Front Matter content
|
||||
---] in test.html@0:0"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__ng_binding] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__ng_binding] 1`] = `
|
||||
"Parser Error: Unexpected token 'Matter' (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -42,7 +42,7 @@ Front Matter content
|
||||
---] in test.html@0:0"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__ng_directive] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__ng_directive] 1`] = `
|
||||
"Parser Error: Unexpected end of expression: ---
|
||||
Front Matter content
|
||||
--- at the end of the expression [---
|
||||
@@ -63,7 +63,7 @@ Front Matter content
|
||||
---] in test.html@0:0"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__ng_interpolation] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__ng_interpolation] 1`] = `
|
||||
"Parser Error: Unexpected token 'Matter' (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -75,7 +75,7 @@ Front Matter content
|
||||
---] in test.html@0:0"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__ts_expression] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__ts_expression] 1`] = `
|
||||
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -84,7 +84,7 @@ exports[`snippet: Should not support front matter [__ts_expression] format 1`] =
|
||||
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__vue_event_binding] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__vue_event_binding] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -93,7 +93,7 @@ exports[`snippet: Should not support front matter [__vue_event_binding] format 1
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__vue_expression] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__vue_expression] 1`] = `
|
||||
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -102,7 +102,7 @@ exports[`snippet: Should not support front matter [__vue_expression] format 1`]
|
||||
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__vue_ts_event_binding] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__vue_ts_event_binding] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -111,7 +111,7 @@ exports[`snippet: Should not support front matter [__vue_ts_event_binding] forma
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [__vue_ts_expression] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[__vue_ts_expression] 1`] = `
|
||||
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -120,7 +120,7 @@ exports[`snippet: Should not support front matter [__vue_ts_expression] format 1
|
||||
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [acorn] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[acorn] 1`] = `
|
||||
"Assigning to rvalue (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -129,7 +129,7 @@ exports[`snippet: Should not support front matter [acorn] format 1`] = `
|
||||
Cause: Assigning to rvalue (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [babel] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[babel] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -138,7 +138,7 @@ exports[`snippet: Should not support front matter [babel] format 1`] = `
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [babel-flow] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[babel-flow] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -147,7 +147,7 @@ exports[`snippet: Should not support front matter [babel-flow] format 1`] = `
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [babel-ts] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[babel-ts] 1`] = `
|
||||
"Unexpected token (3:4)
|
||||
1 | ---
|
||||
2 | Front Matter content
|
||||
@@ -156,7 +156,7 @@ exports[`snippet: Should not support front matter [babel-ts] format 1`] = `
|
||||
Cause: Unexpected token (3:3)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [espree] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[espree] 1`] = `
|
||||
"Assigning to rvalue (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -165,7 +165,7 @@ exports[`snippet: Should not support front matter [espree] format 1`] = `
|
||||
Cause: Assigning to rvalue"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [flow] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[flow] 1`] = `
|
||||
"Invalid left-hand side in assignment (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -174,7 +174,7 @@ exports[`snippet: Should not support front matter [flow] format 1`] = `
|
||||
3 | ---"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [graphql] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[graphql] 1`] = `
|
||||
"Syntax Error: Invalid number, expected digit but got: "-". (1:2)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -183,7 +183,7 @@ exports[`snippet: Should not support front matter [graphql] format 1`] = `
|
||||
Cause: Syntax Error: Invalid number, expected digit but got: "-"."
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [json] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[json] 1`] = `
|
||||
"Invalid left-hand side in prefix operation. (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -192,7 +192,7 @@ exports[`snippet: Should not support front matter [json] format 1`] = `
|
||||
Cause: Invalid left-hand side in prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [json-stringify] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[json-stringify] 1`] = `
|
||||
"Invalid left-hand side in prefix operation. (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -201,7 +201,7 @@ exports[`snippet: Should not support front matter [json-stringify] format 1`] =
|
||||
Cause: Invalid left-hand side in prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [json5] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[json5] 1`] = `
|
||||
"Invalid left-hand side in prefix operation. (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -210,7 +210,7 @@ exports[`snippet: Should not support front matter [json5] format 1`] = `
|
||||
Cause: Invalid left-hand side in prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [jsonc] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[jsonc] 1`] = `
|
||||
"Invalid left-hand side in prefix operation. (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
@@ -219,7 +219,7 @@ exports[`snippet: Should not support front matter [jsonc] format 1`] = `
|
||||
Cause: Invalid left-hand side in prefix operation. (1:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [meriyah] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[meriyah] 1`] = `
|
||||
"Invalid increment/decrement operand (2:7)
|
||||
1 | ---
|
||||
> 2 | Front Matter content
|
||||
@@ -228,7 +228,7 @@ exports[`snippet: Should not support front matter [meriyah] format 1`] = `
|
||||
Cause: [2:6-2:12]: Invalid increment/decrement operand"
|
||||
`;
|
||||
|
||||
exports[`snippet: Should not support front matter [typescript] format 1`] = `
|
||||
exports[`snippet: Should not support front matter format[typescript] 1`] = `
|
||||
"Expression expected. (1:3)
|
||||
> 1 | ---
|
||||
| ^
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`ambient.js.flow [hermes] format 1`] = `
|
||||
"missing initializer in const declaration (1:6)
|
||||
> 1 | const foo: string;
|
||||
| ^
|
||||
2 |
|
||||
Cause: missing initializer in const declaration (1:6)
|
||||
const foo: string;
|
||||
^~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`ambient.js.flow format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
@@ -24,10 +14,11 @@ const foo: string;
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
exports[`ambient.js.flow format[hermes] 1`] = `
|
||||
"missing initializer in const declaration (1:6)
|
||||
> 1 | const foo: string;
|
||||
| ^
|
||||
2 |
|
||||
Cause: missing initializer in const declaration (1:6)
|
||||
const foo: string;
|
||||
^~~~~~~~~~~"
|
||||
@@ -45,3 +36,12 @@ const foo: string;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"missing initializer in const declaration (1:6)
|
||||
> 1 | const foo: string;
|
||||
| ^
|
||||
Cause: missing initializer in const declaration (1:6)
|
||||
const foo: string;
|
||||
^~~~~~~~~~~"
|
||||
`;
|
||||
Whitespace-only changes.
@@ -0,0 +1,36 @@
|
||||
import { outdent } from "outdent";
|
||||
|
||||
const testCases = [
|
||||
outdent`
|
||||
class Foo {
|
||||
constructor
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor constructor
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
export { testCases };
|
||||
@@ -1,17 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-in-html.mjml [html] format 1`] = `
|
||||
"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (3:9)
|
||||
1 | <mj-raw><p></mj-raw>
|
||||
2 | <mj-text>Wrapped</mj-text>
|
||||
> 3 | <mj-raw></p></mj-raw>
|
||||
| ^^^^
|
||||
4 |
|
||||
5 | <MJ-RAW><P></MJ-RAW>
|
||||
6 | <MJ-TEXT>WRAPPED</MJ-TEXT>
|
||||
Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
|
||||
`;
|
||||
|
||||
exports[`invalid-in-html.mjml format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mjml", "html"]
|
||||
@@ -37,3 +25,15 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`invalid-in-html.mjml format[html] 1`] = `
|
||||
"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (3:9)
|
||||
1 | <mj-raw><p></mj-raw>
|
||||
2 | <mj-text>Wrapped</mj-text>
|
||||
> 3 | <mj-raw></p></mj-raw>
|
||||
| ^^^^
|
||||
4 |
|
||||
5 | <MJ-RAW><P></MJ-RAW>
|
||||
6 | <MJ-TEXT>WRAPPED</MJ-TEXT>
|
||||
Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
|
||||
`;
|
||||
@@ -1,16 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`invalid-in-html.mjml [html] format 1`] = `
|
||||
"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (2:25)
|
||||
1 | <mj-style>
|
||||
> 2 | a::before { content: "</p>";
|
||||
| ^^^^
|
||||
3 | }
|
||||
4 | </mj-style>
|
||||
5 |
|
||||
Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
|
||||
`;
|
||||
|
||||
exports[`invalid-in-html.mjml format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mjml", "html"]
|
||||
@@ -38,3 +27,14 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`invalid-in-html.mjml format[html] 1`] = `
|
||||
"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (2:25)
|
||||
1 | <mj-style>
|
||||
> 2 | a::before { content: "</p>";
|
||||
| ^^^^
|
||||
3 | }
|
||||
4 | </mj-style>
|
||||
5 |
|
||||
Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
|
||||
`;
|
||||
Loaded 100 of 142 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user