这是indexloc提供的服务,不要输入任何密码
Skip to content

Cannot run tests from fresh install #12

@mdvorscak

Description

@mdvorscak

Actual behavior

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

appmetrics.js@0.0.9 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions