Skip to content

Commit 0ad1409

Browse files
committed
test: update vitest windows subst drive e2e test to use the ng helper and assert success
NG0203 dual-package hazard error no longer occurs under Vitest 5 on the subst drive.
1 parent 77e8b6b commit 0ad1409

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

tests/e2e/tests/vitest/windows-subst-drive.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict';
22
import * as fs from 'node:fs';
33
import * as path from 'node:path';
4-
import { execAndCaptureError, silentExec } from '../../utils/process';
4+
import { ng, silentExec } from '../../utils/process';
55
import { applyVitestBuilder } from '../../utils/vitest';
66
import { stripVTControlCharacters } from 'node:util';
77

@@ -34,11 +34,8 @@ export default async function (): Promise<void> {
3434
assert(fs.existsSync('angular.json'), 'angular.json should exist on the subst drive');
3535

3636
// 3. Run `ng test`.
37-
// We expect this to fail with NG0203 in the subst environment due to dual-package hazards
38-
// (Angular loading from both X: and D:) within bazel. However, the failure proves that the
39-
// test file was discovered and loaded.
40-
const error = await execAndCaptureError('ng', ['test', '--watch=false']);
41-
const output = stripVTControlCharacters(error.message);
37+
const { stdout } = await ng('test', '--watch=false');
38+
const output = stripVTControlCharacters(stdout);
4239

4340
// 4. Verify that Vitest found the test file and identified the tests within it.
4441
assert.match(

0 commit comments

Comments
 (0)