Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { <%= classifiedModuleName %>Directive } from './<%= dasherizedModuleName

describe('<%= classifiedModuleName %>Directive', () => {
it('should create an instance', () => {
let directive = new <%= classifiedModuleName %>Directive();
const directive = new <%= classifiedModuleName %>Directive();
expect(directive).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ describe('AppComponent', () => {
});

it('should create the app', async(() => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));

it(`should have as title '<%= prefix %> works!'`, async(() => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('<%= prefix %> works!');
}));

it('should render title in a h1 tag', async(() => {
let fixture = TestBed.createComponent(AppComponent);
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
let compiled = fixture.debugElement.nativeElement;
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('<%= prefix %> works!');
}));
});
2 changes: 1 addition & 1 deletion packages/angular-cli/blueprints/ng2/files/__path__/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ getTestBed().initTestEnvironment(
platformBrowserDynamicTesting()
);
// Then we find all the tests.
let context = require.context('./', true, /\.spec\.ts$/);
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-cli/blueprints/ng2/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"karma-remap-istanbul": "^0.2.1",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.2.0",
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
}
5 changes: 4 additions & 1 deletion packages/angular-cli/blueprints/ng2/files/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"eofline": true,
"forin": true,
"import-blacklist": [true, "rxjs"],
"import-spacing": true,
"indent": [
true,
"spaces"
Expand Down Expand Up @@ -62,6 +63,7 @@
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
Expand All @@ -84,6 +86,8 @@
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
Expand All @@ -105,7 +109,6 @@
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true,
"import-destructuring-spacing": true,
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { <%= classifiedModuleName %>Pipe } from './<%= dasherizedModuleName %>.p

describe('<%= classifiedModuleName %>Pipe', () => {
it('create an instance', () => {
let pipe = new <%= classifiedModuleName %>Pipe();
const pipe = new <%= classifiedModuleName %>Pipe();
expect(pipe).toBeTruthy();
});
});