Skip to content

Commit

Permalink
fix(demo): test imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastrajan committed Jul 23, 2019
1 parent abe3493 commit 123ba09
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HighlightModule } from 'ngx-highlightjs';
import typescript from 'highlight.js/lib/languages/typescript';

import { SharedModule } from '../../../shared/shared.module';

import { BasicComponent } from './basic.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

describe('BasicComponent', () => {
let component: BasicComponent;
Expand All @@ -12,7 +14,12 @@ describe('BasicComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [SharedModule],
imports: [
HighlightModule.forRoot({
languages: () => [{ name: 'typescript', func: typescript }]
}),
SharedModule
],
declarations: [BasicComponent]
}).compileComponents();
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { HighlightModule } from 'ngx-highlightjs';
import typescript from 'highlight.js/lib/languages/typescript';

import { SharedModule } from '../../../shared/shared.module';

Expand All @@ -11,7 +13,13 @@ describe('HomeComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, SharedModule],
imports: [
HighlightModule.forRoot({
languages: () => [{ name: 'typescript', func: typescript }]
}),
HttpClientTestingModule,
SharedModule
],
declarations: [HomeComponent]
}).compileComponents();
}));
Expand Down

0 comments on commit 123ba09

Please sign in to comment.