nx/e2e/make-angular-cli-faster/src/make-angular-cli-faster.test.ts
2022-11-09 12:15:30 +00:00

44 lines
1.2 KiB
TypeScript

import {
cleanupProject,
getSelectedPackageManager,
runNgNew,
tmpProjPath,
uniq,
} from '../../utils';
import { PackageManager } from 'nx/src/utils/package-manager';
import { execSync } from 'child_process';
describe('make-angular-cli-faster', () => {
let project: string;
let packageManager: PackageManager;
beforeEach(() => {
project = uniq('proj');
packageManager = getSelectedPackageManager();
// TODO: solve issues with pnpm and remove this fallback
packageManager = packageManager === 'pnpm' ? 'yarn' : packageManager;
});
afterEach(() => {
cleanupProject();
});
// TODO(colum): skip until we can investigate why it is installing incorrect version
xit('should successfully install make-angular-cli-faster with nx cloud', () => {
// ARRANGE
runNgNew(project, packageManager);
expect(() =>
execSync(
`NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx --yes make-angular-cli-faster@latest --useNxCloud=true`,
{
cwd: tmpProjPath(),
env: process.env,
encoding: 'utf-8',
stdio: ['pipe', 'pipe', 'pipe'],
}
)
).not.toThrow();
});
});