/
jsfmt.spec.js.snap
130 lines (112 loc) · 2.74 KB
/
jsfmt.spec.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`html-like-comments.js error test 1`] = `
"Unexpected token (3:1)
1 | // Only support HTML-like comment in HTML
2 | alert(
> 3 | <!-- comment
| ^
4 | 'hello world'
5 | )
6 | "
`;
exports[`module-attributes.js error test 1`] = `
"The only accepted module attribute is \`type\` (1:33)
> 1 | import foo from \\"foo.json\\" with foo: \\"json\\";
| ^
2 | "
`;
exports[`no-for-in-init-concise-binary-in.js error test 1`] = `
"Unexpected token, expected \\")\\" (3:18)
1 | // https://github.com/babel/babel/pull/11931
2 |
> 3 | for (() => x in y;;);
| ^
4 | "
`;
exports[`partial-template-strings.js error test 1`] = `
"Unexpected token (6:42)
4 |
5 | const Diagnostics = {
> 6 | unexpected_token: \`Unexpected token: \${?}\`,
| ^
7 | name_not_found: \`'\${?}' not found.\`
8 | };
9 | Diagnostics.name_not_found(\\"foo\\"); // \\"'foo' not found.\\""
`;
exports[`snippet: #0 error test 1`] = `
"Binding should be performed on object property. (1:3)
> 1 | ::%DebugPrint(null)
| ^"
`;
exports[`snippet: #1 error test 1`] = `
"Unexpected token (1:3)
> 1 | a.%DebugPrint();
| ^"
`;
exports[`snippet: #2 error test 1`] = `
"Unexpected token (1:11)
> 1 | const i = %DebugPrint;
| ^"
`;
exports[`snippet: #3 error test 1`] = `
"Unexpected token (1:7)
> 1 | f(x + ?)
| ^"
`;
exports[`snippet: #4 error test 1`] = `
"Unexpected token (1:5)
> 1 | x + ?
| ^"
`;
exports[`snippet: #5 error test 1`] = `
"Unexpected token (1:1)
> 1 | ?.f()
| ^"
`;
exports[`snippet: #6 error test 1`] = `
"Unexpected token (5:12)
3 |
4 | static isC(obj) {
> 5 | return try obj.#brand;
| ^
6 | }
7 | }"
`;
exports[`snippet: #7 error test 1`] = `
"Unexpected token (1:7)
> 1 | const #{ a, b } = #{ a: 1, b: 2 };
| ^"
`;
exports[`snippet: #8 error test 1`] = `
"Unexpected token (1:7)
> 1 | const #[a, b] = #[1, 2];
| ^"
`;
exports[`snippet: #9 error test 1`] = `
"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar' (1:1)
> 1 | [| 1 |]
| ^"
`;
exports[`snippet: #10 error test 1`] = `
"Invalid decimal (1:1)
> 1 | 0b101011101m;
| ^"
`;
exports[`snippet: #11 error test 1`] = `
"Invalid decimal (1:1)
> 1 | 0x16432m;
| ^"
`;
exports[`snippet: #12 error test 1`] = `
"Invalid decimal (1:1)
> 1 | 0o16432m;
| ^"
`;
exports[`static-import-source-should-not-has-extra-token.js error test 1`] = `
"Unexpected token (4:16)
2 | // be parenthesized, that accidentally break #8016
3 |
> 4 | import {} from (('a'));
| ^
5 | "
`;