mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-22 17:26:10 +01:00
feat(test): add testing infrastructure: karma, jasmine and chrome (#982)
This commit is contained in:
parent
b95abbd48d
commit
4420048bfe
9 changed files with 1389 additions and 56 deletions
42
src/app/app.component.spec.ts
Normal file
42
src/app/app.component.spec.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import {
|
||||
inject,
|
||||
async,
|
||||
TestBed,
|
||||
ComponentFixture
|
||||
} from '@angular/core/testing';
|
||||
|
||||
// Load the implementations that should be tested
|
||||
import { App } from './app.component';
|
||||
import { GlobalState } from './global.state';
|
||||
import { BaImageLoaderService, BaThemeSpinner } from './theme/services';
|
||||
import { BaThemeConfigProvider } from './theme/theme.configProvider';
|
||||
import { BaThemeConfig } from './theme/theme.config';
|
||||
|
||||
describe(`App`, () => {
|
||||
let comp: App;
|
||||
let fixture: ComponentFixture<App>;
|
||||
|
||||
// async beforeEach
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ App ],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
providers: [GlobalState, BaImageLoaderService, BaThemeSpinner, BaThemeConfigProvider, BaThemeConfig]
|
||||
})
|
||||
.compileComponents(); // compile template and css
|
||||
}));
|
||||
|
||||
// synchronous beforeEach
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(App);
|
||||
comp = fixture.componentInstance;
|
||||
|
||||
fixture.detectChanges(); // trigger initial data binding
|
||||
});
|
||||
|
||||
it(`should be readly initialized`, () => {
|
||||
expect(fixture).toBeDefined();
|
||||
expect(comp).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
$roboto-font-path: "~roboto-fontface/fonts/";
|
||||
$roboto-font-path: "~roboto-fontface/fonts";
|
||||
|
||||
@import "~roboto-fontface/css/roboto/sass/roboto-fontface";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue