|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 | 3 | exports[`transform in strip-only mode should not emit 'Caused by: failed to parse' 1`] = `
|
4 |
| -Map { |
5 |
| - "code" => "InvalidSyntax", |
6 |
| - "column" => 23, |
7 |
| - "filename" => "test.ts", |
8 |
| - "line" => 1, |
9 |
| - "message" => "await isn't allowed in non-async function", |
10 |
| - "snippet" => "Promise", |
| 4 | +{ |
| 5 | + "code": "InvalidSyntax", |
| 6 | + "column": 23, |
| 7 | + "filename": "test.ts", |
| 8 | + "line": 1, |
| 9 | + "message": "await isn't allowed in non-async function", |
| 10 | + "snippet": "Promise", |
11 | 11 | }
|
12 | 12 | `;
|
13 | 13 |
|
@@ -38,24 +38,24 @@ exports[`transform in strip-only mode should remove declare enum 3`] = `
|
38 | 38 | `;
|
39 | 39 |
|
40 | 40 | exports[`transform in strip-only mode should report correct error for syntax error 1`] = `
|
41 |
| -Map { |
42 |
| - "code" => "InvalidSyntax", |
43 |
| - "column" => 25, |
44 |
| - "filename" => "test.ts", |
45 |
| - "line" => 1, |
46 |
| - "message" => "Expected ';', '}' or <eof>", |
47 |
| - "snippet" => "syntax", |
| 41 | +{ |
| 42 | + "code": "InvalidSyntax", |
| 43 | + "column": 25, |
| 44 | + "filename": "test.ts", |
| 45 | + "line": 1, |
| 46 | + "message": "Expected ';', '}' or <eof>", |
| 47 | + "snippet": "syntax", |
48 | 48 | }
|
49 | 49 | `;
|
50 | 50 |
|
51 | 51 | exports[`transform in strip-only mode should report correct error for unsupported syntax 1`] = `
|
52 |
| -Map { |
53 |
| - "code" => "UnsupportedSyntax", |
54 |
| - "column" => 0, |
55 |
| - "filename" => "test.ts", |
56 |
| - "line" => 1, |
57 |
| - "message" => "TypeScript enum is not supported in strip-only mode", |
58 |
| - "snippet" => "enum Foo { |
| 52 | +{ |
| 53 | + "code": "UnsupportedSyntax", |
| 54 | + "column": 0, |
| 55 | + "filename": "test.ts", |
| 56 | + "line": 1, |
| 57 | + "message": "TypeScript enum is not supported in strip-only mode", |
| 58 | + "snippet": "enum Foo { |
59 | 59 | a, b
|
60 | 60 | }",
|
61 | 61 | }
|
@@ -115,79 +115,79 @@ exports[`transform in strip-only mode should strip type declarations 1`] = `
|
115 | 115 | `;
|
116 | 116 |
|
117 | 117 | exports[`transform in strip-only mode should throw an error when it encounters a module 1`] = `
|
118 |
| -Map { |
119 |
| - "code" => "UnsupportedSyntax", |
120 |
| - "column" => 0, |
121 |
| - "filename" => "test.ts", |
122 |
| - "line" => 1, |
123 |
| - "message" => "\`module\` keyword is not supported. Use \`namespace\` instead.", |
124 |
| - "snippet" => "module foo", |
| 118 | +{ |
| 119 | + "code": "UnsupportedSyntax", |
| 120 | + "column": 0, |
| 121 | + "filename": "test.ts", |
| 122 | + "line": 1, |
| 123 | + "message": "\`module\` keyword is not supported. Use \`namespace\` instead.", |
| 124 | + "snippet": "module foo", |
125 | 125 | }
|
126 | 126 | `;
|
127 | 127 |
|
128 | 128 | exports[`transform in strip-only mode should throw an error when it encounters a module 2`] = `
|
129 |
| -Map { |
130 |
| - "code" => "UnsupportedSyntax", |
131 |
| - "column" => 8, |
132 |
| - "filename" => "test.ts", |
133 |
| - "line" => 1, |
134 |
| - "message" => "\`module\` keyword is not supported. Use \`namespace\` instead.", |
135 |
| - "snippet" => "module foo", |
| 129 | +{ |
| 130 | + "code": "UnsupportedSyntax", |
| 131 | + "column": 8, |
| 132 | + "filename": "test.ts", |
| 133 | + "line": 1, |
| 134 | + "message": "\`module\` keyword is not supported. Use \`namespace\` instead.", |
| 135 | + "snippet": "module foo", |
136 | 136 | }
|
137 | 137 | `;
|
138 | 138 |
|
139 | 139 | exports[`transform in strip-only mode should throw an error when it encounters a namespace 1`] = `
|
140 |
| -Map { |
141 |
| - "code" => "UnsupportedSyntax", |
142 |
| - "column" => 0, |
143 |
| - "filename" => "test.ts", |
144 |
| - "line" => 1, |
145 |
| - "message" => "TypeScript namespace declaration is not supported in strip-only mode", |
146 |
| - "snippet" => "namespace Foo { export const m = 1; }", |
| 140 | +{ |
| 141 | + "code": "UnsupportedSyntax", |
| 142 | + "column": 0, |
| 143 | + "filename": "test.ts", |
| 144 | + "line": 1, |
| 145 | + "message": "TypeScript namespace declaration is not supported in strip-only mode", |
| 146 | + "snippet": "namespace Foo { export const m = 1; }", |
147 | 147 | }
|
148 | 148 | `;
|
149 | 149 |
|
150 | 150 | exports[`transform in strip-only mode should throw an error when it encounters an enum 1`] = `
|
151 |
| -Map { |
152 |
| - "code" => "UnsupportedSyntax", |
153 |
| - "column" => 0, |
154 |
| - "filename" => "test.ts", |
155 |
| - "line" => 1, |
156 |
| - "message" => "TypeScript enum is not supported in strip-only mode", |
157 |
| - "snippet" => "enum Foo {}", |
| 151 | +{ |
| 152 | + "code": "UnsupportedSyntax", |
| 153 | + "column": 0, |
| 154 | + "filename": "test.ts", |
| 155 | + "line": 1, |
| 156 | + "message": "TypeScript enum is not supported in strip-only mode", |
| 157 | + "snippet": "enum Foo {}", |
158 | 158 | }
|
159 | 159 | `;
|
160 | 160 |
|
161 | 161 | exports[`transform in transform mode shoud throw an object even with deprecatedTsModuleAsError = true 1`] = `
|
162 |
| -Map { |
163 |
| - "code" => "UnsupportedSyntax", |
164 |
| - "column" => 0, |
165 |
| - "filename" => "<anon>", |
166 |
| - "line" => 1, |
167 |
| - "message" => "\`module\` keyword is not supported. Use \`namespace\` instead.", |
168 |
| - "snippet" => "module F", |
| 162 | +{ |
| 163 | + "code": "UnsupportedSyntax", |
| 164 | + "column": 0, |
| 165 | + "filename": "<anon>", |
| 166 | + "line": 1, |
| 167 | + "message": "\`module\` keyword is not supported. Use \`namespace\` instead.", |
| 168 | + "snippet": "module F", |
169 | 169 | }
|
170 | 170 | `;
|
171 | 171 |
|
172 | 172 | exports[`transform in transform mode should throw an error when it encounters a declared module 1`] = `
|
173 |
| -Map { |
174 |
| - "code" => "UnsupportedSyntax", |
175 |
| - "column" => 8, |
176 |
| - "filename" => "test.ts", |
177 |
| - "line" => 1, |
178 |
| - "message" => "\`module\` keyword is not supported. Use \`namespace\` instead.", |
179 |
| - "snippet" => "module foo", |
| 173 | +{ |
| 174 | + "code": "UnsupportedSyntax", |
| 175 | + "column": 8, |
| 176 | + "filename": "test.ts", |
| 177 | + "line": 1, |
| 178 | + "message": "\`module\` keyword is not supported. Use \`namespace\` instead.", |
| 179 | + "snippet": "module foo", |
180 | 180 | }
|
181 | 181 | `;
|
182 | 182 |
|
183 | 183 | exports[`transform in transform mode should throw an error when it encounters a module 1`] = `
|
184 |
| -Map { |
185 |
| - "code" => "UnsupportedSyntax", |
186 |
| - "column" => 0, |
187 |
| - "filename" => "test.ts", |
188 |
| - "line" => 1, |
189 |
| - "message" => "\`module\` keyword is not supported. Use \`namespace\` instead.", |
190 |
| - "snippet" => "module foo", |
| 184 | +{ |
| 185 | + "code": "UnsupportedSyntax", |
| 186 | + "column": 0, |
| 187 | + "filename": "test.ts", |
| 188 | + "line": 1, |
| 189 | + "message": "\`module\` keyword is not supported. Use \`namespace\` instead.", |
| 190 | + "snippet": "module foo", |
191 | 191 | }
|
192 | 192 | `;
|
193 | 193 |
|
|
0 commit comments