Skip to content

Commit 2383641

Browse files
filipesilvavikerman
authored andcommitted
test: fix basic aot e2e to run with Ivy
1 parent 77cb0d3 commit 2383641

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import { getGlobalVariable } from '../../utils/env';
12
import { expectFileToMatch } from '../../utils/fs';
23
import { ng } from '../../utils/process';
34

45
export default async function () {
56
await ng('build', '--aot=true');
6-
await expectFileToMatch('dist/test-project/main-es5.js',
7-
/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
8-
await expectFileToMatch('dist/test-project/main-es2015.js',
9-
/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
7+
8+
if (getGlobalVariable('argv')['ve']) {
9+
await expectFileToMatch('dist/test-project/main-es5.js',
10+
/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
11+
await expectFileToMatch('dist/test-project/main-es2015.js',
12+
/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
13+
} else {
14+
await expectFileToMatch('dist/test-project/main-es5.js',
15+
/platformBrowser.*bootstrapModule.*AppModule/);
16+
await expectFileToMatch('dist/test-project/main-es2015.js',
17+
/platformBrowser.*bootstrapModule.*AppModule/);
18+
}
1019
}

tests/legacy-cli/e2e_runner.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ if (!argv.ve) {
9999
// - The test itself is not applicable to Ivy
100100
// As we transition into using Ivy as the default this list should be reassessed.
101101
allTests = allTests
102-
// The basic AOT check is different with Ivy and being checked in /experimental/ivy.ts.
103-
.filter(name => !name.endsWith('tests/basic/aot.ts'))
104102
// Ivy doesn't support i18n externally at the moment.
105103
.filter(name => !name.includes('tests/i18n/'))
106104
.filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts'))

0 commit comments

Comments
 (0)