practicalmeteor / meteor-mocha

Depreciated - Write meteor package tests with mocha and run them in the browser or from the command line with spacejam.
https://atmospherejs.com/practicalmeteor/mocha
Other
41 stars 13 forks source link

Meteor 1.6.1 Error : Exception while invoking method 'mocha/runServerTests' Error: invalid reporter #100

Open theodorDiaconu opened 6 years ago

theodorDiaconu commented 6 years ago
Exception while invoking method 'mocha/runServerTests' Error: invalid reporter

I20180130-17:52:00.584(2)?     at Mocha.reporter (/Users/theodor/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.17o0et3++os+web.browser+web.cordova/npm/node_modules/mocha/lib/mocha.js:180:13)
I20180130-17:52:00.585(2)?     at MochaRunner.coffee.js.MochaRunner.runServerTests (packages/practicalmeteor_mocha/meteor/src/lib/MochaRunner.coffee:72:19)
I20180130-17:52:00.585(2)?     at MochaRunner.runServerTests (packages/practicalmeteor_mocha/meteor/src/lib/MochaRunner.coffee:1:1)
I20180130-17:52:00.585(2)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:12)
I20180130-17:52:00.585(2)?     at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
I20180130-17:52:00.585(2)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
I20180130-17:52:00.585(2)?     at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
I20180130-17:52:00.585(2)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
I20180130-17:52:00.586(2)?     at Promise (packages/ddp-server/livedata_server.js:715:46)
I20180130-17:52:00.586(2)?     at new Promise (<anonymous>)
I20180130-17:52:00.586(2)?     at Session.method (packages/ddp-server/livedata_server.js:689:23)
I20180130-17:52:00.586(2)?     at packages/ddp-server/livedata_server.js:559:43

This is like the best testing package I've seen in a long time. Please communicate if you are still maintaining it. So we at least know whether or not to mobilize and fork it and continue with it.

theodorDiaconu commented 6 years ago

Just use cultofcoders:mocha instead and it will work with 1.6.1. cheers.

jankapunkt commented 6 years ago

The error above is related to #99 since Meteor 1.6.1 now relies on babel7 and implies CS2, see https://blog.meteor.com/announcing-meteor-1-6-1-50aad71da4e6

JairAviles commented 6 years ago

Hey @theodorDiaconu I did install the original practical package with the command meteor add practicalmeteor:mocha. I got the same exception and after doing some research I came across with this issue.

Afterwards, I remove the package, remove the node modules from my project and install your package with meteor add cultofcoders:mocha.

However, after running with meteor test --driver-package=practicalmeteor:mocha I got the following exception. Any advice, please?

W20180214-18:12:14.467(-6)? (STDERR) /Users/Jair-MAC/.meteor/packages/meteor-tool/.1.6.1.1bnocg1.d5rd++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20180214-18:12:14.468(-6)? (STDERR)                                            throw(ex);
W20180214-18:12:14.468(-6)? (STDERR)                                            ^
W20180214-18:12:14.469(-6)? (STDERR)
W20180214-18:12:14.469(-6)? (STDERR) Error: There is already a collection named "mochaServerRunEvents"
W20180214-18:12:14.469(-6)? (STDERR)     at new Collection (packages/mongo/collection.js:122:15)
W20180214-18:12:14.470(-6)? (STDERR)     at new MochaRunner (packages/practicalmeteor_mocha/meteor/src/lib/MochaRunner.coffee:28:30)
W20180214-18:12:14.470(-6)? (STDERR)     at Function.MochaRunner.coffee.js.MochaRunner.get (packages/practicalmeteor_mocha/meteor/src/lib/MochaRunner.coffee:17:33)
W20180214-18:12:14.470(-6)? (STDERR)     at MochaRunner.coffee.js (packages/practicalmeteor_mocha/meteor/src/lib/MochaRunner.coffee:179:30)
W20180214-18:12:14.470(-6)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:343:9)
W20180214-18:12:14.471(-6)? (STDERR)     at require (packages/modules-runtime.js:238:16)
W20180214-18:12:14.471(-6)? (STDERR)     at MochaRunner.coffee (/private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/packages/practicalmeteor_mocha.js:156:14)
W20180214-18:12:14.471(-6)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:343:9)
W20180214-18:12:14.471(-6)? (STDERR)     at require (packages/modules-runtime.js:238:16)
W20180214-18:12:14.471(-6)? (STDERR)     at index.js (packages/practicalmeteor:mocha/meteor/src/index.js:1:480)
W20180214-18:12:14.472(-6)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:343:9)
W20180214-18:12:14.472(-6)? (STDERR)     at require (packages/modules-runtime.js:238:16)
W20180214-18:12:14.473(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/packages/practicalmeteor_mocha.js:8198:15
W20180214-18:12:14.473(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/packages/practicalmeteor_mocha.js:8205:3
W20180214-18:12:14.473(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/boot.js:411:36
W20180214-18:12:14.473(-6)? (STDERR)     at Array.forEach (<anonymous>)
W20180214-18:12:14.474(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/boot.js:220:19
W20180214-18:12:14.474(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/boot.js:471:5
W20180214-18:12:14.474(-6)? (STDERR)     at Function.run (/private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/profile.js:510:12)
W20180214-18:12:14.475(-6)? (STDERR)     at /private/var/folders/0j/8plp7g1d4cdf_8yt7vr91bqr0000gn/T/meteor-test-runv6ujqq.s1lnr/.meteor/local/build/programs/server/boot.js:470:11
=> Exited with code: 1
theodorDiaconu commented 6 years ago

@JairAviles you need to run it with --driver-package=cultofcoders:mocha

JairAviles commented 6 years ago

@theodorDiaconu works fine. Thank you !!!

aogaili commented 6 years ago

@theodorDiaconu thanks for taking the time fix this package for 1.6.1, I too thing is a great test package to maintain going forward. Do you've any plans to publish the cultofcoders:mocha fork?

Thanks

theodorDiaconu commented 6 years ago

Hey guys, it was public: https://github.com/cult-of-coders/meteor-mocha

nohaibogdan1 commented 6 years ago

@theodorDiaconu Thank you. It works for 1.7.0.3 too 👍