You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to unit test Firebase with Coffeescript and using the vue-cli. Unfortunately, vue add unit-mocha and jsdom cause firebase testing to think it's in a browser and then try to access all these browser features that are unavailable (and crash).
Anybody doing testing with vue and firebase is apt to run into this issue, and while you could argue it's a firebase issue – it would seem easy to make the jsdom setup hook optional through the unit-mocha plugin.
(Took me an extremely long time to figure out what was wrong)
What does the proposed API look like?
Just a commandline argument passed to vue-cli-service test:unit -- perhaps:
vue-cli-service test:unit --no-jsdom
The text was updated successfully, but these errors were encountered:
ryanmtaylor
changed the title
Vue Mocha Unit Tests without Browser Environment
Vue Mocha Unit Tests without Browser Environment (jsdom)
Mar 5, 2020
What problem does this feature solve?
I'm trying to unit test Firebase with Coffeescript and using the vue-cli. Unfortunately, vue add unit-mocha and jsdom cause firebase testing to think it's in a browser and then try to access all these browser features that are unavailable (and crash).
Anybody doing testing with vue and firebase is apt to run into this issue, and while you could argue it's a firebase issue – it would seem easy to make the jsdom setup hook optional through the unit-mocha plugin.
(Took me an extremely long time to figure out what was wrong)
What does the proposed API look like?
Just a commandline argument passed to vue-cli-service test:unit -- perhaps:
vue-cli-service test:unit --no-jsdom
The text was updated successfully, but these errors were encountered: