Open kasadawa opened 5 years ago
We have the same issue. Just found out that it is related to https://github.com/juliangarnier/anime/issues/270. But I am not able to solve it yet.
Any news about this issue? I am getting same problem, when testing with jest and vue-test-utils.
Well, until this issue is solved, we can just mock this function: mocks: { $toasted: { show: jest.fn() } }
Any progress here? I have same issue
The problem is inside package animejs
that vue-toasted
use. Basically, they are checking if animation value like -45px
is a valid selector by catching exception when executing querySelectorAll
. In jest
with jsdom
, it does not throw any exception and return NodeList
instead, which will cause error in later steps.
A dirty workaround would be overriding querySelectorAll
in jsdom
, to check and throw exception if validator is not valid before executing the query.
I have vue project with: vue with typescript, babel, tslint, vuex-module-decorators and jest And I have:
main.ts file:
apple.module.ts
main.spec.ts
When I try to Run the test with vue-cli-service test:unit i am getting TypeError: