xolvio / qualityfaster

An example project showing how to create robust and maintainable acceptance tests
262 stars 58 forks source link

Wallaby issues #39

Open jiku opened 8 years ago

jiku commented 8 years ago

npm start seems fine (with(out) MIRROR=1).

With wallaby_client.js

ReferenceError: Can't find variable: process
at src/imports/testing/client/__meteor_runtime_config__.js:6:16
ReferenceError: Can't find variable: __meteor_runtime_config__
at src/.meteor/local/build/programs/web.browser/packages/meteor.js:36:0
at src/.meteor/local/build/programs/web.browser/packages/meteor.js:28:0
at src/.meteor/local/build/programs/web.browser/packages/meteor.js:1:0
TypeError: 'undefined' is not an object (evaluating 'Package.meteor.Meteor')
at src/.meteor/local/build/programs/web.browser/packages/meteor-base.js:4:0
at src/.meteor/local/build/programs/web.browser/packages/meteor-base.js:1:0

(many of the last one, referring to Package.meteor., Package.mongo., etc.)

and with wallaby_server.js

TypeError: Path must be a string. Received undefined
  at assertPath (path.js:8:11)
  at Object.posix.resolve (path.js:426:5)
  at module.exports (.../xolvio/automated-testing-best-practices/wallaby_server.js:276:20)

npm run karma seems fine too (23/23).

This is following the README instructions with a fresh repo. Atom 1.7.2, Wallaby 1.0.7. nvm current is v0.10.40.

jiku commented 8 years ago

With updated wallaby_server.js

Error: Command failed: meteor node -e "process.stdout.write(process.execPath)"
/usr/local/bin/meteor: line 29: HOME: unbound variable
  at checkExecSyncError (child_process.js:464:13)
  at Object.execSync (child_process.js:504:13)
  at Object.<anonymous> (.../app/wallaby_server.js:18:4)
ghost commented 8 years ago

What happens when you run meteor node -e "process.stdout.write(process.execPath)" from your command line? Which OS are you using?

jiku commented 8 years ago

I get the following path, so I've just hardcoded it in and that seems to work.

var nodePath = "/Users/jiku.dev/.meteor/packages/meteor-
tool/.1.3.2_4.1bnwswu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"

I'm on OS X 10.11.4. Now having ReferenceError: Meteor is not defined but not sure that's related. Tests for stuff that doesn't rely on Meteor pass.

damonmaria commented 8 years ago

For me. The latest version still has ReferenceError: Can't find variable: process. But the wallaby_server.js issue appears to have been sold.

For the ReferenceError changing the line:

   "NODE_ENV": process.env.NODE_ENV || "development"

to just:

"NODE_ENV": "development"

Solves it and gets it running. validation-spec.js then fails but that's just a matter of adding:

import _ from 'underscore';