Search code examples
angularjasminewallaby.js

Wallaby.js - Zone is needed for the async() test helper


This is an Angular 6.x project, testing via Karma/Jasmine

I'm not sure if this is an issue with Wallaby or not, but my tests work when running them outside of Wallaby so I think this may be a config issue...?

Anyways, when running my tests, I get the following error in any tests attempting to use async:

Failed: Zone is needed for the async() test helper but could not be found.
Please make sure that your environment includes zone.js/dist/zone.js

I have searched for hours but not found a solution. I feel like Zone needs to be included globally via Wallaby settings somehow because the tests run fine when I run the Angular standard test runner.

Are you supposed to somehow globally import Zone.js into Wallaby somewhere? I haven't seen this issue in other projects but this is my first time using Wallaby against the new Angular CLI standard format.


Solution

  • The resolution to the issue is here in github, this was a config issue that I resolved by getting an answer from the Wallaby.js team: https://github.com/wallabyjs/public/issues/1768