问题
I type:
npm test
and I get:
It's interesting to note that the import statement works inside the BootScene.test.js file but it doesn't work in the imported file.
I focused on the import statement not working under JEst. So I thought maybe it has something to do with Ecma Script version jest uses. So I tried this solution but the error persists.
This is the repo/branch of this question.
When I type npm start
. Everything flows swiftly and with no errors.
回答1:
I solved it by following this instructions.
Thanks CherryDt.
来源:https://stackoverflow.com/questions/63219552/jest-import-statement-typeerror-cannot-set-property-fillstyle-of-null