Jest-preset-angular: Error when I use browser animations

Created on 21 Apr 2017  路  6Comments  路  Source: thymikee/jest-preset-angular

hello,

You should see the error here:

https://github.com/SrHuevo/error-jest-preset-bowser-animations-module

Greetings!

Bug

Most helpful comment

It's a bug in a preset, which I'll address later. To temporarily fix it, just move animations key above styleUrls

All 6 comments

So the error is gone if you remove this line:

fixture.detectChanges();

but I have no idea, what's going on. Maybe it's a bug in Angular which gets covered by a browser.

fixture.detectChanges()

It is necesary to update the view, I believe that I couldn麓t test whithout that.

If I do not use jest then it works

Yeah, I've seen its working in Karma, just not sure what's the problem. The error comes from Angular, like it needs some extra provider (I understand it should be included by the animation class). If you have some time to dig into it, that would be great.

I tried, but I do not have enough knowledge. The only thing I have discovered is that in the test, BrowserAnimationsModule is not defined, whereas in app.module it is defined

It's a bug in a preset, which I'll address later. To temporarily fix it, just move animations key above styleUrls

great!, thanks @thymikee With this I can continue 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxencefrenette picture maxencefrenette  路  8Comments

gagle picture gagle  路  5Comments

bgoscinski picture bgoscinski  路  3Comments

thekip picture thekip  路  6Comments

thymikee picture thymikee  路  6Comments