Skip to content

Commit

Permalink
WIP move to nx11 & angular11 (scullyio#1198)
Browse files Browse the repository at this point in the history
* move to nx11

* update tests configs

* update config test

* chore: (tests) updated snapshots

* fix jest test

* updated snapshots

* updated snapshots

* updated snapshots

* updated snapshots

Co-authored-by: sanderelias <[email protected]>
  • Loading branch information
jorgeucano and SanderElias authored Jan 18, 2021
1 parent 4259767 commit bded21c
Show file tree
Hide file tree
Showing 64 changed files with 42,433 additions and 11,356 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

/dist
/coverage
/test/
22 changes: 16 additions & 6 deletions apps/sample-blog/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
// const nxPreset = require('@nrwl/jest/preset');
const jestPreset = require('../../jest.preset');

module.exports = {
name: 'sample-blog',
...jestPreset,
roots: ['../../tests/jest/src'],
preset: '../../jest.config.js',
setupFilesAfterEnv: ['../../tests/jest/src/setup-jest.ts'],
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
coverageDirectory: '../../coverage/apps/sample-blog',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js'
]
// snapshotSerializers: [
// 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
// 'jest-preset-angular/build/AngularSnapshotSerializer.js',
// 'jest-preset-angular/build/HTMLCommentSerializer.js',
// ],
displayName: 'sample-blog',
};
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/about/about.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { AboutComponent } from './about.component';

describe('AboutComponent', () => {
let component: AboutComponent;
let fixture: ComponentFixture<AboutComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [AboutComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AboutComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(AboutComponent);
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-blog/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled' })],
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', relativeLinkResolution: 'legacy' })],
exports: [RouterModule],
})
export class AppRoutingModule {}
20 changes: 10 additions & 10 deletions apps/sample-blog/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { TestBed, async } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent],
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent],
}).compileComponents();
})
);

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
Expand All @@ -26,8 +28,6 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain(
'sample-blog app is running!'
);
expect(compiled.querySelector('.content span').textContent).toContain('sample-blog app is running!');
});
});
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { BlogListComponent } from './blog-list.component';

describe('BlogListComponent', () => {
let component: BlogListComponent;
let fixture: ComponentFixture<BlogListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [BlogListComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [BlogListComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(BlogListComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/blog/blog.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { BlogComponent } from './blog.component';

describe('BlogComponent', () => {
let component: BlogComponent;
let fixture: ComponentFixture<BlogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [BlogComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [BlogComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(BlogComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/demo/demo.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { DemoComponent } from './demo.component';

describe('DemoComponent', () => {
let component: DemoComponent;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DemoComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DemoComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(DemoComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/exclude/exclude.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { ExcludeComponent } from './exclude.component';

describe('ExcludeComponent', () => {
let component: ExcludeComponent;
let fixture: ComponentFixture<ExcludeComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ExcludeComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ExcludeComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(ExcludeComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { ManualIdleComponent } from './manual-idle.component';

describe('ManualIdleComponent', () => {
let component: ManualIdleComponent;
let fixture: ComponentFixture<ManualIdleComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ManualIdleComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ManualIdleComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(ManualIdleComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { PagenotfoundComponent } from './pagenotfound.component';

describe('PagenotfoundComponent', () => {
let component: PagenotfoundComponent;
let fixture: ComponentFixture<PagenotfoundComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PagenotfoundComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PagenotfoundComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(PagenotfoundComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/slow/slow.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { SlowComponent } from './slow.component';

describe('SlowComponent', () => {
let component: SlowComponent;
let fixture: ComponentFixture<SlowComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [SlowComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SlowComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(SlowComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/static/static.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { StaticComponent } from './static.component';

describe('StaticComponent', () => {
let component: StaticComponent;
let fixture: ComponentFixture<StaticComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [StaticComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [StaticComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(StaticComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/user/post/post.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { PostComponent } from './post.component';

describe('PostComponent', () => {
let component: PostComponent;
let fixture: ComponentFixture<PostComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PostComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PostComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(PostComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/user/posts/posts.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { PostsComponent } from './posts.component';

describe('PostsComponent', () => {
let component: PostsComponent;
let fixture: ComponentFixture<PostsComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PostsComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PostsComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(PostsComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/user/user.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { UserComponent } from './user.component';

describe('UserComponent', () => {
let component: UserComponent;
let fixture: ComponentFixture<UserComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [UserComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [UserComponent],
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(UserComponent);
Expand Down
14 changes: 8 additions & 6 deletions apps/sample-blog/src/app/user/users/users.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { UsersComponent } from './users.component';

describe('UsersComponent', () => {
let component: UsersComponent;
let fixture: ComponentFixture<UsersComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [UsersComponent]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [UsersComponent],
}).compileComponents();
})
);

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

0 comments on commit bded21c

Please sign in to comment.