Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions apps/app0/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parserOptions": { "project": ["apps/app0/tsconfig.*?.json"] },
"rules": {
"@angular-eslint/directive-selector": [
"error",
{ "type": "attribute", "prefix": "largerepo", "style": "camelCase" }
{
"type": "attribute",
"prefix": "largerepo",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{ "type": "element", "prefix": "largerepo", "style": "kebab-case" }
{
"type": "element",
"prefix": "largerepo",
"style": "kebab-case"
}
]
}
},
Expand Down
18 changes: 14 additions & 4 deletions apps/app0/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
module.exports = {
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/apps/app0',

displayName: 'app0',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
displayName: 'app0',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
transform: { '^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular' },
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
};
12 changes: 2 additions & 10 deletions apps/app0/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
declarations: [AppComponent],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand All @@ -19,13 +20,4 @@ describe('AppComponent', () => {
const app = fixture.componentInstance;
expect(app.title).toEqual('app0');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain(
'Welcome to app0!'
);
});
});
2 changes: 1 addition & 1 deletion apps/app0/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion apps/app0/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
}
13 changes: 10 additions & 3 deletions apps/app1/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parserOptions": { "project": ["apps/app1/tsconfig.*?.json"] },
"rules": {
"@angular-eslint/directive-selector": [
"error",
{ "type": "attribute", "prefix": "largerepo", "style": "camelCase" }
{
"type": "attribute",
"prefix": "largerepo",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{ "type": "element", "prefix": "largerepo", "style": "kebab-case" }
{
"type": "element",
"prefix": "largerepo",
"style": "kebab-case"
}
]
}
},
Expand Down
18 changes: 14 additions & 4 deletions apps/app1/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
module.exports = {
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/apps/app0',

displayName: 'app1',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
displayName: 'app1',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
transform: { '^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular' },
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
};
12 changes: 2 additions & 10 deletions apps/app1/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
declarations: [AppComponent],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand All @@ -19,13 +20,4 @@ describe('AppComponent', () => {
const app = fixture.componentInstance;
expect(app.title).toEqual('app0');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain(
'Welcome to app0!'
);
});
});
2 changes: 1 addition & 1 deletion apps/app1/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion apps/app1/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
}
64 changes: 3 additions & 61 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
module.exports = {
projects: [
'<rootDir>/apps/app0',
'<rootDir>/apps/app1',
'<rootDir>/libs/app0/lib0/lib0',
'<rootDir>/libs/app0/lib0/childlib0',
'<rootDir>/libs/app0/lib0/childlib1',
'<rootDir>/libs/app0/lib0/childlib2',
'<rootDir>/libs/app0/lib0/childlib3',
'<rootDir>/libs/app0/lib0/childlib4',
'<rootDir>/libs/app0/lib0/childlib5',
'<rootDir>/libs/app0/lib0/childlib6',
'<rootDir>/libs/app0/lib0/childlib7',
'<rootDir>/libs/app0/lib0/childlib8',
'<rootDir>/libs/app0/lib0/childlib9',
'<rootDir>/libs/app0/lib1/lib1',
'<rootDir>/libs/app0/lib1/childlib0',
'<rootDir>/libs/app0/lib1/childlib1',
'<rootDir>/libs/app0/lib1/childlib2',
'<rootDir>/libs/app0/lib1/childlib3',
'<rootDir>/libs/app0/lib1/childlib4',
'<rootDir>/libs/app0/lib1/childlib5',
'<rootDir>/libs/app0/lib1/childlib6',
'<rootDir>/libs/app0/lib1/childlib7',
'<rootDir>/libs/app0/lib1/childlib8',
'<rootDir>/libs/app0/lib1/childlib9',
'<rootDir>/libs/app0/lib2/lib2',
'<rootDir>/libs/app0/lib2/childlib0',
'<rootDir>/libs/app0/lib2/childlib1',
'<rootDir>/libs/app0/lib2/childlib2',
'<rootDir>/libs/app0/lib2/childlib3',
'<rootDir>/libs/app0/lib2/childlib4',
'<rootDir>/libs/app0/lib2/childlib5',
'<rootDir>/libs/app0/lib2/childlib6',
'<rootDir>/libs/app0/lib2/childlib7',
'<rootDir>/libs/app0/lib2/childlib8',
'<rootDir>/libs/app0/lib2/childlib9',
'<rootDir>/libs/app0/lib3/lib3',
'<rootDir>/libs/app0/lib3/childlib0',
'<rootDir>/libs/app0/lib3/childlib1',
'<rootDir>/libs/app0/lib3/childlib2',
'<rootDir>/libs/app0/lib3/childlib3',
'<rootDir>/libs/app0/lib3/childlib4',
'<rootDir>/libs/app0/lib3/childlib5',
'<rootDir>/libs/app0/lib3/childlib6',
'<rootDir>/libs/app0/lib3/childlib7',
'<rootDir>/libs/app0/lib3/childlib8',
'<rootDir>/libs/app0/lib3/childlib9',
'<rootDir>/libs/app0/lib4/lib4',
'<rootDir>/libs/app0/lib4/childlib0',
'<rootDir>/libs/app0/lib4/childlib1',
'<rootDir>/libs/app0/lib4/childlib2',
'<rootDir>/libs/app0/lib4/childlib3',
'<rootDir>/libs/app0/lib4/childlib4',
'<rootDir>/libs/app0/lib4/childlib5',
'<rootDir>/libs/app0/lib4/childlib6',
'<rootDir>/libs/app0/lib4/childlib7',
'<rootDir>/libs/app0/lib4/childlib8',
'<rootDir>/libs/app0/lib4/childlib9',
],
};
const { getJestProjects } = require('@nrwl/jest');

module.exports = { projects: getJestProjects() };
15 changes: 10 additions & 5 deletions libs/app0/lib0/childlib0/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parserOptions": {
"project": ["libs/app0/lib0/childlib0/tsconfig.*?.json"]
},
"rules": {
"@angular-eslint/directive-selector": [
"error",
{ "type": "attribute", "prefix": "largerepo", "style": "camelCase" }
{
"type": "attribute",
"prefix": "largerepo",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{ "type": "element", "prefix": "largerepo", "style": "kebab-case" }
{
"type": "element",
"prefix": "largerepo",
"style": "kebab-case"
}
]
}
},
Expand Down
18 changes: 14 additions & 4 deletions libs/app0/lib0/childlib0/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
module.exports = {
preset: '../../../../jest.preset.js',
coverageDirectory: '../../../../coverage/libs/app0/lib0/childlib0',

displayName: 'app0-lib0-childlib0',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
displayName: 'app0-lib0-childlib0',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
transform: { '^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular' },
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
};
3 changes: 2 additions & 1 deletion libs/app0/lib0/childlib0/src/lib/childlib0.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Childlib0Module } from './childlib0.module';
describe('Childlib0Module', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [Childlib0Module]
imports: [Childlib0Module],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component0Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component0Component]
declarations: [Lib0childlib0component0Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component1Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component1Component]
declarations: [Lib0childlib0component1Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component10Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component10Component]
declarations: [Lib0childlib0component10Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component11Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component11Component]
declarations: [Lib0childlib0component11Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component12Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component12Component]
declarations: [Lib0childlib0component12Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component13Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component13Component]
declarations: [Lib0childlib0component13Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component14Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component14Component]
declarations: [Lib0childlib0component14Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component15Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component15Component]
declarations: [Lib0childlib0component15Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component16Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component16Component]
declarations: [Lib0childlib0component16Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('Lib0childlib0component17Component', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [Lib0childlib0component17Component]
declarations: [Lib0childlib0component17Component],
teardown: { destroyAfterEach: false },
}).compileComponents();
}));

Expand Down
Loading