Skip to content
Closed
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
@@ -1,7 +1,9 @@
import {<%= classifiedModuleName %>} from './<%= fileName %>';

describe('<%= classifiedModuleName %>', () => {
it('should create an instance', () => {
expect(new <%= classifiedModuleName %>()).toBeTruthy();
describe('.constructor()', () => {
it('should create an instance', () => {
expect(new <%= classifiedModuleName %>()).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ describe('<%= classifiedModuleName %>Component', () => {
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
describe('.constructor()', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { TestBed, async } from '@angular/core/testing';
import { <%= classifiedModuleName %>Directive } from './<%= dasherizedModuleName %>.directive';

describe('<%= classifiedModuleName %>Directive', () => {
it('should create an instance', () => {
let directive = new <%= classifiedModuleName %>Directive();
expect(directive).toBeTruthy();
describe('.constructor()', () => {
it('should create an instance', () => {
let directive = new <%= classifiedModuleName %>Directive();
expect(directive).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ describe('<%= classifiedModuleName %>Module', () => {
<%= camelizedModuleName %>Module = new <%= classifiedModuleName %>Module();
});

it('should create an instance', () => {
expect(<%= camelizedModuleName %>Module).toBeTruthy();
})
describe('.constructor()', () => {
it('should create an instance', () => {
expect(<%= camelizedModuleName %>Module).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ describe('AppComponent', () => {
});
});

it('should create the app', async(() => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
describe('.constructor()', () => {
it('should create the app', async(() => {
let fixture = TestBed.createComponent(AppComponent);
let 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;
expect(app.title).toEqual('<%= prefix %> works!');
}));
it(`should have as title '<%= prefix %> works!'`, async(() => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('<%= prefix %> works!');
}));

it('should render title in a h1 tag', async(() => {
let fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
let compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('<%= prefix %> works!');
}));
it('should render title in a h1 tag', async(() => {
let fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
let compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('<%= prefix %> works!');
}));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { TestBed, async } from '@angular/core/testing';
import { <%= classifiedModuleName %>Pipe } from './<%= dasherizedModuleName %>.pipe';

describe('<%= classifiedModuleName %>Pipe', () => {
it('create an instance', () => {
let pipe = new <%= classifiedModuleName %>Pipe();
expect(pipe).toBeTruthy();
describe('.constructor()', () => {
it('create an instance', () => {
let pipe = new <%= classifiedModuleName %>Pipe();
expect(pipe).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ describe('<%= classifiedModuleName %>Service', () => {
});
});

it('should ...', inject([<%= classifiedModuleName %>Service], (service: <%= classifiedModuleName %>Service) => {
expect(service).toBeTruthy();
}));
describe('.constructor()', () => {
it('should ...',
inject([<%= classifiedModuleName %>Service], (service: <%= classifiedModuleName %>Service) => {
expect(service).toBeTruthy();
}));
});
});