meteor / todos

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

Dependency issues: Importing Nightmare (for the new dispatch:mocha) fails #219

Closed 0o-de-lally closed 6 years ago

0o-de-lally commented 7 years ago

@aldeed 's new dispatch:mocha works great on newly-created blank apps. But after installing on Meteor Todos app as a reference, some issues come up.

Server tests work fine, as expected. But client tests with Nightmare seem to hang. It's failing silently with no errors in 'debug'.

Interestingly, if you try to use Nightmare in the Todo app server side you get Error: Cannot find module './actions' This does not happen on a newly created app, which runs fine.

Updating packages or meteor does not help.

This pull request only adds the npm script 'new-mocha', and also a reproduction file ./server/reproduction.nightmare.js for discussion.

https://github.com/DispatchMe/meteor-mocha/issues/11

apollo-cla commented 7 years ago

@keyscores: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

0o-de-lally commented 7 years ago

@hwillson I think you were the last person to look at the phantomjs issues. Nightmare seems to work great except for this dependency issue.

aldeed commented 7 years ago

@keyscores I got all of the new dispatch:mocha browsers to work in the Todos app on my machine. One thing to try is add DEBUG=nightmare:*,electron:* before npm test or whatever test command, and then you'll see the nightmare and electron logs. The only issue I ran into sometimes was the "too many open files" issue, which is a known issue with current Meteor. You can get around that by setting your ulimit high and also meteor reset before each time running the tests.

hwillson commented 6 years ago

Thanks for reporting this @lpgeiger - https://github.com/meteor/todos/pull/256 fixes this.