-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
jsfmt.spec.js.snap
159 lines (137 loc) · 3.34 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`html-like-comments.js [babel] format 1`] = `
"Unexpected token (3:1)
1 | // Only support HTML-like comment in HTML
2 | alert(
> 3 | <!-- comment
| ^
4 | 'hello world'
5 | )
6 |"
`;
exports[`import-assertions-for-export-without-from.js [babel] format 1`] = `
"Missing semicolon. (1:26)
> 1 | export { default as foo } assert { type: "json" };
| ^
2 |"
`;
exports[`import-assertions-with-parens.js [babel] format 1`] = `
"Unexpected token (1:19)
> 1 | import "x" assert ({type: 'json'});
| ^
2 |"
`;
exports[`invalid-escape-in-identifier.js [babel] format 1`] = `
"Invalid Unicode escape. (1:7)
> 1 | const \\u{20} = 1
| ^
2 | const \\u{3000} = 1
3 |"
`;
exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = `
"Expecting Unicode escape sequence \\uXXXX. (1:3)
> 1 | a\\ = a
| ^
2 |"
`;
exports[`module-attributes.js [babel] format 1`] = `
"Unexpected token, expected "(" (1:33)
> 1 | import foo from "foo.json" with type: "json";
| ^
2 |"
`;
exports[`no-for-in-init-concise-binary-in.js [babel] format 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 [babel] format 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 [babel] format 1`] = `
"Binding should be performed on object property. (1:3)
> 1 | ::%DebugPrint(null)
| ^"
`;
exports[`snippet: #1 [babel] format 1`] = `
"Unexpected token (1:3)
> 1 | a.%DebugPrint();
| ^"
`;
exports[`snippet: #2 [babel] format 1`] = `
"Unexpected token (1:11)
> 1 | const i = %DebugPrint;
| ^"
`;
exports[`snippet: #3 [babel] format 1`] = `
"Unexpected token (1:7)
> 1 | f(x + ?)
| ^"
`;
exports[`snippet: #4 [babel] format 1`] = `
"Unexpected token (1:5)
> 1 | x + ?
| ^"
`;
exports[`snippet: #5 [babel] format 1`] = `
"Unexpected token (1:1)
> 1 | ?.f()
| ^"
`;
exports[`snippet: #6 [babel] format 1`] = `
"Unexpected token (5:12)
3 |
4 | static isC(obj) {
> 5 | return try obj.#brand;
| ^
6 | }
7 | }"
`;
exports[`snippet: #7 [babel] format 1`] = `
"Unexpected token (1:7)
> 1 | const #{ a, b } = #{ a: 1, b: 2 };
| ^"
`;
exports[`snippet: #8 [babel] format 1`] = `
"Unexpected token (1:7)
> 1 | const #[a, b] = #[1, 2];
| ^"
`;
exports[`snippet: #9 [babel] format 1`] = `
"Unexpected token (1:2)
> 1 | [| 1 |]
| ^"
`;
exports[`snippet: #10 [babel] format 1`] = `
"Invalid decimal. (1:1)
> 1 | 0b101011101m;
| ^"
`;
exports[`snippet: #11 [babel] format 1`] = `
"Invalid decimal. (1:1)
> 1 | 0x16432m;
| ^"
`;
exports[`snippet: #12 [babel] format 1`] = `
"Invalid decimal. (1:1)
> 1 | 0o16432m;
| ^"
`;
exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = `
"Unexpected token (4:16)
2 | // be parenthesized, that accidentally break #8016
3 |
> 4 | import {} from (('a'));
| ^
5 |"
`;