question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you run the test suite?

See original GitHub issue

multiple issues

npm test

> ethers@ test /home/xyz/Development/ethers.js
> if [ "$TEST" == "" ]; then npm run test-node; else npm run "test-$TEST"; fi

sh: 1: [: unexpected operator
npm ERR! missing script: test-
npm ERR! 
npm ERR! Did you mean this?
npm ERR!     test

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xyz/.npm/_logs/2020-08-12T04_55_42_891Z-debug.log
npm ERR! Test failed.  See above for more details.
npm run test-node

> ethers@ test-node /home/xyz/Development/ethers.js
> mocha --no-colors --reporter ./packages/tests/reporter ./packages/tests/lib/test-*.js


Error: Cannot find module 'ethers'
Require stack:
- /home/xyz/Development/ethers.js/packages/tests/lib/test-account.js
- /home/xyz/Development/ethers.js/node_modules/mocha/lib/esm-utils.js
- /home/xyz/Development/ethers.js/node_modules/mocha/lib/mocha.js
- /home/xyz/Development/ethers.js/node_modules/mocha/lib/cli/one-and-dones.js
- /home/xyz/Development/ethers.js/node_modules/mocha/lib/cli/options.js
- /home/xyz/Development/ethers.js/node_modules/mocha/bin/mocha
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/xyz/Development/ethers.js/packages/tests/lib/test-account.js:7:16)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at requireOrImport (/home/xyz/Development/ethers.js/node_modules/mocha/lib/esm-utils.js:15:12)
    at Object.exports.loadFilesAsync (/home/xyz/Development/ethers.js/node_modules/mocha/lib/esm-utils.js:28:26)
    at Mocha.loadFilesAsync (/home/xyz/Development/ethers.js/node_modules/mocha/lib/mocha.js:386:19)
    at singleRun (/home/xyz/Development/ethers.js/node_modules/mocha/lib/cli/run-helpers.js:149:15)
    at exports.runMocha (/home/xyz/Development/ethers.js/node_modules/mocha/lib/cli/run-helpers.js:186:11)
    at Object.exports.handler (/home/xyz/Development/ethers.js/node_modules/mocha/lib/cli/run.js:319:11)
    at /home/xyz/Development/ethers.js/node_modules/mocha/node_modules/yargs/lib/command.js:241:49
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ethers@ test-node: `mocha --no-colors --reporter ./packages/tests/reporter ./packages/tests/lib/test-*.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ethers@ test-node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xyz/.npm/_logs/2020-08-12T04_57_30_610Z-debug.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kumaviscommented, Aug 12, 2020

@ricmoo thanks for the quick response maybe add npm run bootstrap as a post-install script (or whichever one runs when its not a dep)

0reactions
ricmoocommented, Aug 25, 2020

I think this is closed with your #1001. If I’m mistaken, please re-open. 😃

Thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running test suites - IBM
On the Explore tab, click the smart folder that displays your test suites. · Locate your test suite and then select it in...
Read more >
JUnit - Suite Test - Tutorialspoint
Test suite is used to bundle a few unit test cases and run them together. In JUnit, both @RunWith and @Suite annotations are...
Read more >
How to Create TestNG Test Suite to Run Test in a ... - Tools QA
In New file wizard, add filename as 'testng.xml' and click on the Finish button. naming testng file · Finally, it will add a...
Read more >
Create JUnit Test Suite with Example: @RunWith ... - Guru99
Steps to create Test Suite and Test Runner. Step 1) Create a simple test class (e.g. MyFirstClassTest) and add a method annotated with...
Read more >
Plan and run test suites - ADM Help Centers
On the test suite Planning tab, verify that the necessary tests are included in the run. To change the tests included in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found