"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/legacy-cli/e2e/tests/commands/add/secure-registry.ts" between
angular-cli-12.1.2.tar.gz and angular-cli-12.1.3.tar.gz

About: Angular CLI is a command line interface for Angular.

secure-registry.ts  (angular-cli-12.1.2):secure-registry.ts  (angular-cli-12.1.3)
import { expectFileNotToExist, expectFileToExist } from '../../../utils/fs'; import { expectFileNotToExist, expectFileToExist } from '../../../utils/fs';
import { git, ng } from '../../../utils/process'; import { git, ng } from '../../../utils/process';
import { createNpmConfigForAuthentication } from '../../../utils/registry'; import { createNpmConfigForAuthentication } from '../../../utils/registry';
import { expectToFail } from '../../../utils/utils'; import { expectToFail } from '../../../utils/utils';
export default async function () { export default async function () {
// The environment variable has priority over the .npmrc // The environment variable has priority over the .npmrc
const originalRegistryVariable = process.env['NPM_CONFIG_REGISTRY'];
delete process.env['NPM_CONFIG_REGISTRY']; delete process.env['NPM_CONFIG_REGISTRY'];
try { const command = ['add', '@angular/pwa', '--skip-confirmation'];
const command = ['add', '@angular/pwa', '--skip-confirmation']; await expectFileNotToExist('src/manifest.webmanifest');
await expectFileNotToExist('src/manifest.webmanifest');
// Works with unscoped registry authentication details
// Works with unscoped registry authentication details await createNpmConfigForAuthentication(false);
await createNpmConfigForAuthentication(false); await ng(...command);
await ng(...command); await expectFileToExist('src/manifest.webmanifest');
await expectFileToExist('src/manifest.webmanifest'); await git('clean', '-dxf');
await git('clean', '-dxf');
// Works with scoped registry authentication details
// Works with scoped registry authentication details await expectFileNotToExist('src/manifest.webmanifest');
await expectFileNotToExist('src/manifest.webmanifest');
await createNpmConfigForAuthentication(true);
await createNpmConfigForAuthentication(true); await ng(...command);
await ng(...command); await expectFileToExist('src/manifest.webmanifest');
await expectFileToExist('src/manifest.webmanifest');
// Invalid authentication token
// Invalid authentication token await createNpmConfigForAuthentication(false, true);
await createNpmConfigForAuthentication(false, true); await expectToFail(() => ng(...command));
await expectToFail(() => ng(...command));
await createNpmConfigForAuthentication(true, true);
await createNpmConfigForAuthentication(true, true); await expectToFail(() => ng(...command));
await expectToFail(() => ng(...command));
} finally {
process.env['NPM_CONFIG_REGISTRY'] = originalRegistryVariable;
}
} }
 End of changes. 2 change blocks. 
27 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)