Skip to content

Commit a986d8a

Browse files
clydinalan-agius4
authored andcommitted
test(@angular-devkit/build-angular): ensure jobs are complete before checking logs
1 parent 5ba886c commit a986d8a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/angular_devkit/build_angular/src/browser/specs/errors_spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@ describe('Browser Builder errors', () => {
6464
const run = await architect.scheduleTarget(targetSpec, { aot: true }, { logger });
6565
const output = await run.result;
6666
expect(output.success).toBe(false);
67+
68+
// Wait for the builder to complete
69+
await run.stop();
70+
6771
if (!veEnabled) {
6872
expect(logs.join()).toContain('selector must be a string');
6973
} else {
7074
expect(logs.join()).toContain('Function expressions are not supported in');
7175
}
72-
await run.stop();
7376
});
7477

7578
it('shows missing export errors', async () => {
@@ -87,7 +90,10 @@ describe('Browser Builder errors', () => {
8790
const run = await architect.scheduleTarget(targetSpec, overrides, { logger });
8891
const output = await run.result;
8992
expect(output.success).toBe(false);
90-
expect(logs.join()).toContain(`export 'missingExport' was not found in 'rxjs'`);
93+
94+
// Wait for the builder to complete
9195
await run.stop();
96+
97+
expect(logs.join()).toContain(`export 'missingExport' was not found in 'rxjs'`);
9298
});
9399
});

0 commit comments

Comments
 (0)