meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Problems running the mocha test commands (windows)? #129

Closed Ryuzavi closed 8 years ago

Ryuzavi commented 8 years ago

Hey

Apologies if I've missed something but when I try to run the test commands out of a clean clone I get the following error:

PS E:\meteor-projects\pleasework> npm run test-watch

> @ test-watch E:\meteor-projects\pleasework
> meteor test --driver-package practicalmeteor:mocha

[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
W20160504-17:16:17.429(1)? (STDERR)
W20160504-17:16:17.430(1)? (STDERR) C:\Users\test\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20160504-17:16:17.431(1)? (STDERR)                                             throw(ex);
W20160504-17:16:17.431(1)? (STDERR)                                                   ^
W20160504-17:16:17.431(1)? (STDERR) TypeError: Cannot call method 'push' of undefined
W20160504-17:16:17.431(1)? (STDERR)     at meteorInstall.node_modules.meteor.dispatch:mocha-core.node_modules.mocha.lib.mocha.js (node_modules/meteor/dispatch:mocha-core/node_modules/mocha/lib/mocha.js:28:1)
W20160504-17:16:17.431(1)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
W20160504-17:16:17.431(1)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
W20160504-17:16:17.431(1)? (STDERR)     at meteorInstall.node_modules.meteor.dispatch:mocha-core.node_modules.mocha.index.js (node_modules/meteor/dispatch:mocha-core/node_modules/mocha/index.js:3:1)
W20160504-17:16:17.432(1)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
W20160504-17:16:17.432(1)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
W20160504-17:16:17.432(1)? (STDERR)     at meteorInstall.node_modules.meteor.dispatch:mocha-core.server.js (packages/dispatch:mocha-core/server.js:1:1)
W20160504-17:16:17.432(1)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
W20160504-17:16:17.432(1)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
W20160504-17:16:17.432(1)? (STDERR)     at node_modules/meteor/dispatch:mocha-core/node_modules/mocha/node_modules/growl/lib/growl.js:234:1

Am assuming this is perhaps windows fun?

lorensr commented 8 years ago

Hi, thanks for reporting! I can't reproduce on Mac, but I just upgraded our version of mocha – would you please pull the latest changes from master and rerun, to see if it's fixed? If not, maybe these guys know what's going on: https://github.com/DispatchMe/meteor-mocha-core/issues

lorensr commented 8 years ago

The upgrade was just reverted. If you'd like to rerun, you'd need to checkout e9ef0ae2f3af514c465eb611c19c1c7b1e5a0862 first.

You can follow the progress of fixing mocha in #130

Ryuzavi commented 8 years ago

Ah ok. Thanks for this. Will keep an eye on https://github.com/meteor/todos/issues/130

Let me know if you want me to close this issue.

trajano commented 8 years ago

They have a PR for this on mocha side https://github.com/mochajs/mocha/pull/2218

AshwinMekala commented 8 years ago

Temporary Solution :

https://github.com/DispatchMe/meteor-mocha-phantomjs/issues/13

Finally got it working by uninstalling both drivers and specifically installing practicalmeteor:mocha and then dispatch:mocha-phantomjs in that specific order.

With this setup dispatch tests will run but practical tests won't. The page is just empty and the tests get ignored. I think this is already known though.