From 1aef7b95009bf3388b86420e128d9994d7bc8dce Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Mon, 3 Apr 2023 11:00:36 +0200 Subject: [PATCH] chore(core): check for failures --- e2e/workspace-create-npm/jest.config.ts | 4 ++-- .../src/create-nx-workspace-npm.test.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/e2e/workspace-create-npm/jest.config.ts b/e2e/workspace-create-npm/jest.config.ts index 893e2c7c9ff5f1..577af9c54737b5 100644 --- a/e2e/workspace-create-npm/jest.config.ts +++ b/e2e/workspace-create-npm/jest.config.ts @@ -1,11 +1,11 @@ /* eslint-disable */ export default { transform: { - '^.+\\.[tj]sx?$': 'ts-jest', + '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, + globals: {}, displayName: 'e2e-workspace-create-npm', preset: '../../jest.preset.js', }; diff --git a/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts b/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts index 1fdcf0f87538d1..56bfd23d124606 100644 --- a/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts +++ b/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts @@ -14,18 +14,24 @@ describe('create-nx-workspace --preset=npm', () => { const wsName = uniq('npm'); const packageManager = getSelectedPackageManager() || 'pnpm'; + let originalVerbose; beforeAll(() => { + originalVerbose = process.env.NX_VERBOSE_LOGGING; + process.env.NX_VERBOSE_LOGGING = 'true'; runCreateWorkspace(wsName, { preset: 'npm', packageManager, }); }); - beforeEach(() => { - runCommand(`git reset --hard`); + afterEach(() => { + runCommand(`git reset --hard HEAD`); }); - afterAll(() => cleanupProject()); + afterAll(() => { + process.env.NX_VERBOSE_LOGGING = originalVerbose; + cleanupProject(); + }); it('should add angular application', () => { packageInstall('@nrwl/angular', wsName);