Path error with Mocha and Yarn run test on 14.04

nodejs
docker
yarn

#1

Hi Circle Ci teams ! We have an embarrassing error launching our tests with Circle CI 2.0 (Ubuntu 14.04)

The tests works fine on my MacOSX and on our Ubuntu 16.04 AWS EC2 instances. That seems to be a Mocha.js error… but that’s very weird the tests work in all the environments excepted Circle CI…
How could we fix this error and make our Circle Ci builds work ?

The error in Circle CI :

...
yarn run test
...
$ eslint .
$ mocha "./src/migrations/index.test.js" --require babel-core/register
Warning: Could not find any test files matching pattern: ./src/migrations/index.test.js
No test files found
error Command failed with exit code 1.
...

Our package.json :

...
"test-migrations": "mocha \"./src/migrations/index.test.js\" --require babel-core/register",
"test": "yarn run lint && yarn run test-migrations && mocha \"./src/index.test.js\" --require babel-core/register",
...

Thanks a lot for your help !

Clement from clovis.pro


#2

Ok that’s an issue with docker-compose which doesn’t mount the volume with the host files…

very weird, i posted an issue on github : https://github.com/docker/compose/issues/5519

you can close this post


#3