Skip to content

Commit

Permalink
test(@angular/cli): remove node:assert usage.
Browse files Browse the repository at this point in the history
`node:assert` is not available in Node.js version 14.15.5
  • Loading branch information
alan-agius4 authored and dgp1130 committed Nov 16, 2022
1 parent 87277d9 commit f1fe0ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/legacy-cli/e2e/tests/update/update-secure-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { createNpmConfigForAuthentication } from '../../utils/registry';
import { expectToFail } from '../../utils/utils';
import { isPrereleaseCli } from '../../utils/project';
import { getActivePackageManager } from '../../utils/packages';
import assert from 'node:assert';

export default async function () {
// The environment variable has priority over the .npmrc
Expand Down Expand Up @@ -41,6 +40,8 @@ export default async function () {
await createNpmConfigForAuthentication(true, true);

const error = await expectToFail(() => exec('yarn', 'ng', 'update', ...extraArgs));
assert.match(error.message, /not allowed to access package/);
if (!/not allowed to access package/.test(error.message)) {
throw new Error('Error did not match not allowed to access package.');
}
}
}

0 comments on commit f1fe0ea

Please sign in to comment.