Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

CUSTOM_ELEMENTS_SCHEMA error occur while unit testing with jasmine and karma

import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './../app.component';
import { RouterTestingModule } from '@angular/router/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

describe('AppComponent', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
      declarations: [AppComponent],
      imports: [RouterTestingModule]
    });
    TestBed.compileComponents();
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #error #occur #unit #testing #jasmine #karma
ADD COMMENT
Topic
Name
2+5 =