|
1 | 1 | import { expectFileNotToExist, expectFileToExist } from '../../../utils/fs'; |
2 | | -import { getActivePackageManager, installWorkspacePackages } from '../../../utils/packages'; |
| 2 | +import { installWorkspacePackages } from '../../../utils/packages'; |
3 | 3 | import { git, ng } from '../../../utils/process'; |
4 | 4 | import { createNpmConfigForAuthentication } from '../../../utils/registry'; |
5 | 5 | import { expectToFail } from '../../../utils/utils'; |
6 | 6 |
|
7 | 7 | export default async function () { |
8 | 8 | // The environment variable has priority over the .npmrc |
9 | 9 | delete process.env['NPM_CONFIG_REGISTRY']; |
10 | | - const isNpm = getActivePackageManager() === 'npm'; |
11 | 10 |
|
12 | 11 | const command = ['add', '@angular/pwa', '--skip-confirmation']; |
13 | | - await expectFileNotToExist('public/manifest.webmanifest'); |
14 | 12 |
|
15 | | - // Works with unscoped registry authentication details |
16 | | - if (!isNpm) { |
17 | | - // NPM no longer support unscoped. |
18 | | - await createNpmConfigForAuthentication(false); |
19 | | - await ng(...command); |
20 | | - await expectFileToExist('public/manifest.webmanifest'); |
21 | | - await git('clean', '-dxf'); |
22 | | - } |
23 | 13 | // Works with scoped registry authentication details |
24 | 14 | await expectFileNotToExist('public/manifest.webmanifest'); |
25 | 15 |
|
26 | | - await createNpmConfigForAuthentication(true); |
| 16 | + await createNpmConfigForAuthentication(); |
27 | 17 | await ng(...command); |
28 | 18 | await expectFileToExist('public/manifest.webmanifest'); |
29 | 19 |
|
30 | 20 | // Invalid authentication token |
31 | | - if (isNpm) { |
32 | | - // NPM no longer support unscoped. |
33 | | - await createNpmConfigForAuthentication(false, true); |
34 | | - await expectToFail(() => ng(...command)); |
35 | | - } |
36 | | - |
37 | 21 | await createNpmConfigForAuthentication(true, true); |
38 | 22 | await expectToFail(() => ng(...command)); |
39 | 23 |
|
|
0 commit comments