Skip to content

Commit 0b55ebb

Browse files
alan-agius4dgp1130
authored andcommitted
test: update no-zoneless jest e2e to account for fixture.whenStable change
This commit replaces `fixture.whenStable` to `fixture.detectChanges` in the Jest spec file when using zone.js
1 parent 9dab578 commit 0b55ebb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/legacy-cli/e2e/tests/jest/no-zoneless.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { replaceInFile } from '../../utils/fs';
12
import { applyJestBuilder } from '../../utils/jest';
23
import { installPackage, uninstallPackage } from '../../utils/packages';
34
import { ng } from '../../utils/process';
@@ -8,8 +9,15 @@ export default async function (): Promise<void> {
89
polyfills: ['zone.js', 'zone.js/testing'],
910
});
1011

12+
await replaceInFile(
13+
'src/app/app.spec.ts',
14+
'await fixture.whenStable();',
15+
'fixture.detectChanges();',
16+
);
17+
1118
try {
1219
await installPackage('zone.js');
20+
1321
const { stderr } = await ng('test');
1422

1523
if (!stderr.includes('Jest builder is currently EXPERIMENTAL')) {

0 commit comments

Comments
 (0)