Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Running tests fails on OS X #181

Open
TinyExplosions opened this issue Mar 30, 2016 · 3 comments
Open

Running tests fails on OS X #181

TinyExplosions opened this issue Mar 30, 2016 · 3 comments

Comments

@TinyExplosions
Copy link

I cloned the gitevents repo, performed an npm install . and then ran npm run test

I get the following errors: (npm is version 3.8.3 and node version is 5.4.0). node is being run via nvm.

$ npm run test

> gitevents@0.4.0 test ~/OSS/gitevents
> npm run test-int


> gitevents@0.4.0 test-int ~/OSS/gitevents
> NODE_ENV=test tape tests/integration/*.js | tap-spec

undefined:1
milestone = arguments.varValue;
          ^

TypeError: Assignment to constant variable.
    at eval (eval at __set__ (~/OSS/gitevents/lib/events.js:362:19), <anonymous>:1:11)
    at Function.__set__ (~/OSS/gitevents/lib/events.js:362:5)
    at Object.<anonymous> (~/OSS/gitevents/tests/integration/events.js:11:8)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at ~/OSS/gitevents/node_modules/tape/bin/tape:31:13



npm ERR! Darwin 15.4.0
npm ERR! argv "~/.nvm/versions/node/v5.4.0/bin/node" "~/.nvm/versions/node/v5.4.0/bin/npm" "run" "test-int"
npm ERR! node v5.4.0
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! gitevents@0.4.0 test-int: `NODE_ENV=test tape tests/integration/*.js | tap-spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gitevents@0.4.0 test-int script 'NODE_ENV=test tape tests/integration/*.js | tap-spec'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gitevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=test tape tests/integration/*.js | tap-spec
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gitevents
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gitevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     ~/OSS/gitevents/npm-debug.log

npm ERR! Darwin 15.4.0
npm ERR! argv "~/.nvm/versions/node/v5.4.0/bin/node" "~/.nvm/versions/node/v5.4.0/bin/npm" "run" "test"
npm ERR! node v5.4.0
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! gitevents@0.4.0 test: `npm run test-int`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gitevents@0.4.0 test script 'npm run test-int'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gitevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run test-int
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gitevents
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gitevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!    ~/OSS/gitevents/npm-debug.log

This is as much for your info as a bug report, as I suspect it could be my setup that's causing the problems! (I'm running OS X 10.11.4, MacBook Pro (Retina, 13-inch, Late 2013))

@ifraixedes
Copy link
Contributor

Running on node v5.9.1 and on ubuntu Wily x64 server happens the same.

The problem isn't your setup, the issue is the integration test is using rewire defining a settter for an internal const defined in lib/event.js:L9(

const milestone = require('./milestone');
)

An V8 runtime because protect const vars reassignation

Not sure why the test passed in the CI and in other dev machines, as I haven't been involved in the development for long time.

I expect that somebody involved recently in the development will provide better explanation and will fix it shortly.

Sorry for the inconveniences and many thanks for reporting it.

@ifraixedes
Copy link
Contributor

Removing 3 lines of test/integration/event.js L9:L12 should the issue.

I'm not sending a PR because I haven't got pass a few expects of test/integration/talks.js which may be because I miss to setup something.

@PatrickHeneise
Copy link
Member

there shouldn't be any setup required for the tests. Please submit the PR and I'll continue to investigate as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants