Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jest test Cannot read property 'Object.<anonymous>' of null

/Users/***/Desktop/projects/***/node_modules/jest-runtime/build/index.js:517
    const wrapper = this._environment.runScript(transformedFile.script)[

Sometimes if i'm run npm test jest given this error.

like image 311
Melih Berberoglu Avatar asked Nov 18 '17 20:11

Melih Berberoglu


1 Answers

It can be caused by running an Animated animation in React Native. Not running that animation when jest is detected is the best solution I found for now. I tried not to run animation, and the error gone.

like image 62
inoutwhy Avatar answered Nov 16 '22 00:11

inoutwhy