appmetrics.js icon indicating copy to clipboard operation
appmetrics.js copied to clipboard

Cannot run tests from fresh install

Open mdvorscak opened this issue 8 years ago • 0 comments

Actual behavior

After cloning and running yarn install && npm run test you get the following error:

[email protected] test /home/mike/projects/appmetrics.js ./node_modules/mocha/bin/mocha

/home/mike/projects/appmetrics.js/test/test.js:4 const assert = chai.assert; ^

ReferenceError: chai is not defined at Object. (/home/mike/projects/appmetrics.js/test/test.js:4:16) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at /home/mike/projects/appmetrics.js/node_modules/mocha/lib/mocha.js:222:27 at Array.forEach () at Mocha.loadFiles (/home/mike/projects/appmetrics.js/node_modules/mocha/lib/mocha.js:219:14) at Mocha.run (/home/mike/projects/appmetrics.js/node_modules/mocha/lib/mocha.js:487:10) at Object. (/home/mike/projects/appmetrics.js/node_modules/mocha/bin/_mocha:459:18) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3

Expected behavior

I can easily run tests with yarn install && npm run test. Actually needing to set up a server for the project folder is cumbersome and limits the ability for CI/CD.

mdvorscak avatar Jan 09 '18 05:01 mdvorscak