Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Fix mocha tests #130

Closed
lorensr opened this issue May 4, 2016 · 25 comments
Closed

Fix mocha tests #130

lorensr opened this issue May 4, 2016 · 25 comments

Comments

@lorensr
Copy link
Contributor

lorensr commented May 4, 2016

> git clone git@github.com:meteor/todos.git && cd todos
> npm install
> npm run test-watch

> @ test-watch /Users/me/repro/todos
> meteor test --driver-package practicalmeteor:mocha

[[[[[ Tests ]]]]]                             

=> Started proxy.                             
=> Started MongoDB.                           
=> Meteor 1.3.2.4 is available. Update this project with 'meteor update'.

Unable to resolve some modules:

  "sass" in                                   
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "stylus" in                                 
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "less" in                                   
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "markdown" in                               
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "discount" in                               
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "markdown-js" in                            
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "marked" in                                 
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "coffee-script" in                          
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/node_modules/jade/lib/filters.js
(web.browser)
  "_process" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "base64-js" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "ieee754" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "is-array" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "core-util-is" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "inherits" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "isarray" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "string_decoder/" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "readable-stream/readable.js" in            
/Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "readable-stream/writable.js" in            
/Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "readable-stream/duplex.js" in              
/Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "readable-stream/transform.js" in           
/Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "readable-stream/passthrough.js" in         
/Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "browser-stdout" in /Users/me/.meteor/packages/dispatch_mocha-phantomjs/.0.0.4.qem3ft++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "browser/escape-string-regexp" in           
/Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js (web.browser)
  "browser/path" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "growl" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/web.browser/mocha.js (web.browser)
  "browser/tty" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "browser/diff" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "browser/fs" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "jade" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/web.browser/mocha.js (web.browser)
  "browser/events" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "browser/debug" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)
  "browser/glob" in /Users/me/.meteor/packages/practicalmeteor_mocha/.2.1.1-rc.1.h8ypk6++os+web.browser+web.cordova/npm/node_modules/mocha/mocha.js
(web.browser)

Consider running: meteor npm install --save sass stylus less markdown discount markdown-js marked coffee-script _process base64-js ieee754 is-array
core-util-is inherits isarray string_decoder readable-stream browser-stdout browser growl jade

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

I think this is an issue with practicalmeteor:mocha. I don't think it actually matters, but it would be good to clean it up. Perhaps you could open a issue over there?

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

@tmeasday Was due to out-of-date mocha and release. There are a few more out-of-date packages, maybe we can try a general meteor update

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

looks like i broke CI, sorry. looking into it

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

using app seems to work fine. running npm test shows this on client:

image

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

We do have a root route, so don't know what this is:

image

tried upgrading flow router, no change.

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

@lorensr let me take a look

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

I think the no route for path error is normal, because we are running w/o the routes file. It shouldn't be a problem however.

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

Is there a way to tell what context you're running in, so that FR could not throw the error when it's in non---full-app test mode?

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

Yeah, definitely. FR should probably not throw when Meteor.isTest or Meteor.isPackageTest are set

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

I'll submit an issue there. Two remaining errors are

image

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

So it seems just like a problem with dispatch:mocha-phantomjs -- the write error comes out of the bowels of Mocha where it thinks it's running on the server.

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

cc @aldeed ---I'm not sure if we are doing something wrong but this seems like a bug

@lorensr
Copy link
Contributor Author

lorensr commented May 4, 2016

FR should probably not throw when Meteor.isTest or Meteor.isPackageTest are set

like this?

image

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

That makes sense to me. It's possible that'll break their tests; it could be acceptable to just have the first guard.

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

I'll try and repro this against dispatch:mocha-phantomjs

@aldeed
Copy link
Contributor

aldeed commented May 4, 2016

Is it latest mocha-phantomjs?

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

Yeah it happens with 0.1.0

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

(I'll push that todos/master)

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

So its seems to be a problem with the interaction between dispatch:mocha-phantomjs and practicalmeteor:mocha.

You can trivially repo it by just including them both in a project: https://github.com/tmeasday/mocha-phantom-problem

@tmeasday
Copy link
Contributor

tmeasday commented May 4, 2016

@aldeed can we figure out a way to do practicalmeteor/meteor-mocha#23 (comment) ?

@aldeed
Copy link
Contributor

aldeed commented May 4, 2016

@tmeasday You could submit a PR for practicalmeteor/mocha. I haven't had time to look into it and it will realistically be another week before I will.

@tmeasday
Copy link
Contributor

tmeasday commented May 5, 2016

@lorensr I probably won't have time to look at this, so unless you are keen to do so maybe we should revert the last few commits for now

@lorensr
Copy link
Contributor Author

lorensr commented May 5, 2016

@tmeasday Okay. I just made the one, so like git revert HEAD and push?

On Wed, May 4, 2016 at 8:08 PM, Tom Coleman notifications@github.com
wrote:

@lorensr https://github.com/lorensr I probably won't have time to look
at this, so unless you are keen to do so maybe we should revert the last
few commits for now


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#130 (comment)

lorensr added a commit that referenced this issue May 5, 2016
@lorensr
Copy link
Contributor Author

lorensr commented May 5, 2016

Oh, you made one too. Okay, I did git revert HEAD HEAD^ and CI is green.

@lorensr lorensr changed the title Incomplete package.json? Fix mocha tests May 5, 2016
@hwillson
Copy link
Contributor

hwillson commented Oct 4, 2016

The Unable to resolve some modules issue is no longer occurring with the latest version of todos (and its dependencies). Closing this off.

@hwillson hwillson closed this as completed Oct 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants