Open leighman opened 7 years ago
i got
RUNTIME EXCEPTION Exception occurred while loading your tests
document is not defined.
But my target is browser, not node.
@leighman Seems that there is no stack for your error. I'm happy to receive a PR for a better error logging for this and this. Probably something like err.stack || err.message || "unknown error"
could work.
@brutalcrozt Document does not exist on node. You need to use jsdom or something else to simulate browsers environment.
My bundle target is browser. So this module doesn't support browser target? only support node target?
There's no browser environment per default in mocha or mocha-webpack. You need to use jsdom or a test runnner that runs against real browser like karma-webpack.
@zinserjan Thanks for info and your cooperation. But can you give explicit note on readme, that your module by default only support node script?
Hi,
I am having the same issue as @leighman, and i believe it is erroring on an ES6 import statement in Vue (import { getters } from "../src/store/modules/tickets/index), commenting this out allows them to run
./node_modules/.bin/mocha-webpack "test/**/*.test.js" --webpack-config build/webpack.test.conf.js
returns the same error
Please let me know if there is any other info you need
Thanks Simon
I was able to fix my issue, I was exporting firebase.auth() and not firebase.auth, not sure why it broke the test though
When trying to run my tests I get
Please advise how I can debug this.
It seems to happen when trying to import from on particular Vue file but I can't narrow it down any more at the moment.