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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.angular
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
19 changes: 15 additions & 4 deletions apps/app0/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
module.exports = {
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/apps/app0',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
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',
};
22 changes: 8 additions & 14 deletions apps/app0/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
import { AppComponent } from './app.component';

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

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
Expand All @@ -19,13 +22,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
19 changes: 15 additions & 4 deletions apps/app1/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
module.exports = {
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/apps/app0',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
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',
};
22 changes: 8 additions & 14 deletions apps/app1/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
import { AppComponent } from './app.component';

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

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
Expand All @@ -19,13 +22,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
20 changes: 16 additions & 4 deletions libs/app0/lib0/childlib0/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
module.exports = {
preset: '../../../../jest.preset.js',
coverageDirectory: '../../../../coverage/libs/app0/lib0/childlib0',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],

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',
};
13 changes: 8 additions & 5 deletions libs/app0/lib0/childlib0/src/lib/childlib0.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
import { Childlib0Module } from './childlib0.module';

describe('Childlib0Module', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [Childlib0Module]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [Childlib0Module],
teardown: { destroyAfterEach: false },
}).compileComponents();
})
);

it('should create', () => {
expect(Childlib0Module).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ describe('Lib0childlib0component0Component', () => {
let component: Lib0childlib0component0Component;
let fixture: ComponentFixture<Lib0childlib0component0Component>;

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

beforeEach(() => {
fixture = TestBed.createComponent(Lib0childlib0component0Component);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ describe('Lib0childlib0component1Component', () => {
let component: Lib0childlib0component1Component;
let fixture: ComponentFixture<Lib0childlib0component1Component>;

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

beforeEach(() => {
fixture = TestBed.createComponent(Lib0childlib0component1Component);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ describe('Lib0childlib0component10Component', () => {
let component: Lib0childlib0component10Component;
let fixture: ComponentFixture<Lib0childlib0component10Component>;

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

beforeEach(() => {
fixture = TestBed.createComponent(Lib0childlib0component10Component);
Expand Down
Loading