Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't run the unit tests for Chimpy #141

Closed
rsshilli opened this issue May 16, 2019 · 4 comments
Closed

I can't run the unit tests for Chimpy #141

rsshilli opened this issue May 16, 2019 · 4 comments

Comments

@rsshilli
Copy link

rsshilli commented May 16, 2019

I can't run the unit tests for Chimp to ensure that my changes are okay. I'm running:

npm run testonly
Expected behaviour

I should see tests running.

Actual behaviour
circleci@c598bc29d650:~/chimpy$ npm run testonly
module.js:550
    throw err;
    ^

Error: Cannot find module 'babel-core/register'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at program.compilers.forEach.c (/home/circleci/chimpy/node_modules/mocha/bin/_mocha:453:3)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/home/circleci/chimpy/node_modules/mocha/bin/_mocha:445:19)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
circleci@c598bc29d650:~/chimpy$
Exact steps to reproduce / repository that demonstrates the problem
  1. Run:
git clone https://github.com/TheBrainFamily/chimpy.git
cd chimpy
npm install
npm run testonly
Version & tools:
  • Chimp command line used: npm run testonly
  • Chimp config file: None
  • Chimp: master (0.54.0)
  • Node.js: v8.16.0
  • Java: openjdk version "1.8.0_212"
  • Operation system: Ubuntu inside of a docker container
@rsshilli
Copy link
Author

Also related: It would be really nice to be able to run the tests from a windows machine. This library really discourages non-Unix maintainers.

@alanning
Copy link
Contributor

Here's the fix for this:

diff --git a/mocha.opts b/mocha.opts
index 91d5576..d29106a 100644
--- a/mocha.opts
+++ b/mocha.opts
@@ -1,4 +1,4 @@
---compilers js:babel-core/register
+--compilers js:@babel/register
 --reporter spec
 --ui bdd
 mocha-setup.js

alanning added a commit to alanning/chimpy that referenced this issue May 16, 2019
@rsshilli
Copy link
Author

Nice!

@lgandecki
Copy link
Member

Thanks @alanning and @rsshilli , this is released as of 1.2.0

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

No branches or pull requests

3 participants