Angular2 RC4 testing: Uncaught (in promise): TypeError: testing_1.expect(…).toBeAnInstanceOf is not a function


Here is my test in Angular2:

it('should initialize without DI service',
         async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
           var template = '<component></component>';
           return tcb.overrideTemplate(TestComponent, template)
               .then((fixture ) => {

It throws the following error:

Uncaught (in promise): TypeError: testing_1.expect(...).toBeAnInstanceOf is not a function

It works fine in Angular2 RC2 till I updated to RC4.

By : P.Petkov

This video can help you solving your question :)
By: admin