Skip to content

Commit

Permalink
fix(core): reuse the workspace for cnw-npm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Mar 31, 2023
1 parent a89eab1 commit 5300762
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ import {
packageInstall,
readJson,
runCLI,
runCommand,
runCreateWorkspace,
uniq,
} from '@nrwl/e2e/utils';

describe('create-nx-workspace --preset=npm', () => {
let wsName;
const wsName = uniq('npm');
const packageManager = getSelectedPackageManager() || 'pnpm';

beforeEach(() => {
wsName = uniq('npm');
beforeAll(() => {
runCreateWorkspace(wsName, {
preset: 'npm',
packageManager,
});
});

afterEach(() => cleanupProject());
beforeEach(() => {
runCommand(`git reset --hard`);
});

afterAll(() => cleanupProject());

it('should add angular application', () => {
packageInstall('@nrwl/angular', wsName);
Expand Down

0 comments on commit 5300762

Please sign in to comment.