Skip to content

Commit

Permalink
fix: nx and jest setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Romanchuk committed Dec 1, 2023
1 parent 570379a commit 0e6a61d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apps/angular-i18next-demo/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AppComponent } from './app.component';
import { RouterTestingModule } from '@angular/router/testing';

describe('AppComponent', () => {
beforeEach(async () => {
beforeEach(waitForAsync(() => {
await TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent],
Expand Down
12 changes: 11 additions & 1 deletion libs/angular-i18next/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
import 'jest-preset-angular/setup-jest';
import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});
28 changes: 10 additions & 18 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
{
"npmScope": "angular-i18next",
"affected": {
"defaultBase": "master"
},
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
}
},

"targetDependencies": {
"build": [
{
Expand Down Expand Up @@ -64,7 +47,8 @@
"cache": true
},
"build": {
"cache": true
"cache": true,
"inputs": ["production", "^production"]
},
"e2e": {
"cache": true
Expand All @@ -81,6 +65,14 @@
"codeCoverage": true
}
}
},
"test": {
"cache": true
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [],
"production": ["default"]
}
}

0 comments on commit 0e6a61d

Please sign in to comment.