Skip to content

Commit 857aa43

Browse files
committed
fix: test
1 parent fe63308 commit 857aa43

6 files changed

Lines changed: 13 additions & 16 deletions

File tree

e2e/src/app.e2e-spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { AppPage } from './app.po';
21
import { browser, logging } from 'protractor';
32

3+
import { AppPage } from './app.po';
4+
45
describe('workspace-project App', () => {
56
let page: AppPage;
67

@@ -16,6 +17,8 @@ describe('workspace-project App', () => {
1617
afterEach(async () => {
1718
// Assert that there are no errors emitted from the browser
1819
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
20+
21+
// tslint:disable-next-line:no-object-literal-type-assertion
1922
expect(logs).not.toContain(jasmine.objectContaining({
2023
level: logging.Level.SEVERE,
2124
} as logging.Entry));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"test": "echo Please use yarn run test:unit",
112112
"test:unit": "ng test",
113113
"ci:test": "ng test --watch=false --code-coverage",
114-
"ci:e2e": "ng e2e"
114+
"ci:e2e": "CHROME_BIN=chromium-browser DISPLAY=:99.0 ng e2e"
115115
},
116116
"dependencies": {
117117
"@angular/animations": "10.2.0",

src/app/main/containers/main-scroll-to-top/main-scroll-to-top.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, TestBed } from '@angular/core/testing';
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
22
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
33
import { RouterTestingModule } from '@angular/router/testing';
44

@@ -7,14 +7,14 @@ import { vendorImports } from '../../main.module';
77
import { MainScrollToTopComponent } from './main-scroll-to-top.component';
88

99
describe('MainScrollToTopComponent', () => {
10-
beforeEach(async(() => {
10+
beforeEach(waitForAsync(() => {
1111
TestBed.configureTestingModule({
12-
imports: [NoopAnimationsModule, RouterTestingModule, ...vendorImports],
1312
declarations: [MainScrollToTopComponent],
13+
imports: [NoopAnimationsModule, RouterTestingModule, ...vendorImports],
1414
}).compileComponents();
1515
}));
1616

17-
it('should render', async(() => {
17+
it('should render', waitForAsync(() => {
1818
const fixture = TestBed.createComponent(MainScrollToTopComponent);
1919
const component = fixture.debugElement.componentInstance;
2020
expect(component).toBeTruthy();

src/app/main/pages/main-root/main-root.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { waitForAsync, TestBed } from '@angular/core/testing';
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
22
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
33
import { RouterTestingModule } from '@angular/router/testing';
44

@@ -10,8 +10,8 @@ import { vendorImports } from '../../main.module';
1010
describe('MainRootComponent', () => {
1111
beforeEach(waitForAsync(() => {
1212
TestBed.configureTestingModule({
13-
imports: [NoopAnimationsModule, RouterTestingModule, ...vendorImports],
1413
declarations: [...components, ...containers, ...pages],
14+
imports: [NoopAnimationsModule, RouterTestingModule, ...vendorImports],
1515
}).compileComponents();
1616
}));
1717

src/polyfills.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
*/
2020

2121
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
22-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
22+
// Import 'classlist.js'; // Run `npm install --save classlist.js`.
2323

2424
/**
2525
* Web Animations `@angular/platform-browser/animations`
2626
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
2727
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
2828
*/
29-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
29+
// Import 'web-animations-js'; // Run `npm install --save web-animations-js`.
3030

3131
/**
3232
* By default, zone.js will patch all possible macroTask and DomEvents
@@ -57,7 +57,6 @@
5757
*/
5858
import 'zone.js/dist/zone'; // Included with Angular CLI.
5959

60-
6160
/***************************************************************************************************
6261
* APPLICATION IMPORTS
6362
*/

tslint.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@
143143
"no-trailing-whitespace": true,
144144
"no-unnecessary-initializer": true,
145145
"no-unused-expression": true,
146-
"no-unused-variable": true,
147-
"no-use-before-declare": true,
148146
"no-var-keyword": true,
149147
"object-literal-sort-keys": [
150148
true,
@@ -214,11 +212,8 @@
214212
}
215213
],
216214
"unified-signatures": true,
217-
"use-host-property-decorator": true,
218-
"use-input-property-decorator": true,
219215
"use-isnan": true,
220216
"use-life-cycle-interface": true,
221-
"use-output-property-decorator": true,
222217
"use-pipe-transform-interface": true,
223218
"variable-name": [
224219
true,

0 commit comments

Comments
 (0)