|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | | -exports[`NgJestCompiler with isolatedModule false should compile codes with useESM true 1`] = ` |
4 | | -"import { __decorate } from \\"tslib\\"; |
5 | | -import __NG_CLI_RESOURCE__0 from \\"./app.component.html\\"; |
6 | | -import { Component } from '@angular/core'; |
7 | | -let AppComponent = class AppComponent { |
8 | | - constructor() { |
9 | | - this.title = 'test-app-v10'; |
10 | | - } |
11 | | -}; |
12 | | -AppComponent = __decorate([ |
13 | | - Component({ |
14 | | - selector: 'app-root', |
15 | | - template: __NG_CLI_RESOURCE__0, |
16 | | - styles: [] |
17 | | - }) |
18 | | -], AppComponent); |
19 | | -export { AppComponent }; |
20 | | -//# " |
| 3 | +exports[`NgJestCompiler with isolatedModules false should transform codes with useESM false using hoisting, replace resources and downlevel ctor transformers 1`] = ` |
| 4 | +Object { |
| 5 | + "before": Array [ |
| 6 | + [Function], |
| 7 | + [Function], |
| 8 | + [Function], |
| 9 | + ], |
| 10 | +} |
21 | 11 | `; |
22 | 12 |
|
23 | | -exports[`NgJestCompiler with isolatedModule false should compile new code when file changes: from hasErrorFileContent 1`] = ` |
24 | | -"\\"use strict\\"; |
25 | | -Object.defineProperty(exports, \\"__esModule\\", { value: true }); |
26 | | -exports.AppComponent = void 0; |
27 | | -const tslib_1 = require(\\"tslib\\"); |
28 | | -const core_1 = require(\\"@angular/core\\"); |
29 | | -let = class { |
30 | | - constructor() { |
31 | | - this. = ; |
32 | | - } |
33 | | -}; |
34 | | - = tslib_1.__decorate([ |
35 | | - core_1.Component({ |
36 | | - selector: 'app-root', |
37 | | - template: require(\\"./app.component.html\\"), |
38 | | - styles: [] |
39 | | - }) |
40 | | -], ); |
41 | | -exports.AppComponent = ; |
42 | | -//# " |
| 13 | +exports[`NgJestCompiler with isolatedModules false should transform codes with useESM true using hoisting, replace resources and downlevel ctor transformers 1`] = ` |
| 14 | +Object { |
| 15 | + "before": Array [ |
| 16 | + [Function], |
| 17 | + [Function], |
| 18 | + [Function], |
| 19 | + ], |
| 20 | +} |
43 | 21 | `; |
44 | 22 |
|
45 | | -exports[`NgJestCompiler with isolatedModule false should compile new code when file changes: from noErrorFileContent 1`] = ` |
46 | | -"\\"use strict\\"; |
47 | | -Object.defineProperty(exports, \\"__esModule\\", { value: true }); |
48 | | -exports.AppComponent = void 0; |
49 | | -const tslib_1 = require(\\"tslib\\"); |
50 | | -const core_1 = require(\\"@angular/core\\"); |
51 | | -let AppComponent = class AppComponent { |
52 | | - constructor() { |
53 | | - this.title = 'test-app-v10'; |
54 | | - } |
55 | | -}; |
56 | | -AppComponent = tslib_1.__decorate([ |
57 | | - core_1.Component({ |
58 | | - selector: 'app-root', |
59 | | - template: require(\\"./app.component.html\\"), |
60 | | - styles: [] |
61 | | - }) |
62 | | -], AppComponent); |
63 | | -exports.AppComponent = AppComponent; |
64 | | -//# " |
| 23 | +exports[`NgJestCompiler with isolatedModules true should transform codes with useESM false using hoisting, replace resources and downlevel ctor transformers 1`] = ` |
| 24 | +Object { |
| 25 | + "before": Array [ |
| 26 | + [Function], |
| 27 | + [Function], |
| 28 | + [Function], |
| 29 | + ], |
| 30 | +} |
65 | 31 | `; |
66 | 32 |
|
67 | | -exports[`NgJestCompiler with isolatedModule false should throw diagnostics error for new file which is: known by Program 1`] = `"src/__tests__/__mocks__/foo.component.ts(8,3): error TS2322: Type 'string' is not assignable to type 'number'."`; |
68 | | - |
69 | | -exports[`NgJestCompiler with isolatedModule false should throw diagnostics error for new file which is: not known by Program 1`] = `"src/__tests__/__mocks__/foo.component.ts(8,3): error TS2322: Type 'string' is not assignable to type 'number'."`; |
| 33 | +exports[`NgJestCompiler with isolatedModules true should transform codes with useESM true using hoisting, replace resources and downlevel ctor transformers 1`] = ` |
| 34 | +Object { |
| 35 | + "before": Array [ |
| 36 | + [Function], |
| 37 | + [Function], |
| 38 | + [Function], |
| 39 | + ], |
| 40 | +} |
| 41 | +`; |
0 commit comments