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

unit tests: throw error #104

Closed
escapedcat opened this issue Sep 17, 2018 · 2 comments
Closed

unit tests: throw error #104

escapedcat opened this issue Sep 17, 2018 · 2 comments

Comments

@escapedcat
Copy link
Contributor

  1. checkout master
  2. npm i
  3. npm t or npm run test

Results in:

> webpack-merge@4.1.4 test /Users/foo/data/src/webpack-merge
> mocha tests/test-*

internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module '..'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/foo/data/src/webpack-merge/tests/test-merge-multiple.js:2:22)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /Users/foo/data/src/webpack-merge/node_modules/mocha/lib/mocha.js:231:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/Users/foo/data/src/webpack-merge/node_modules/mocha/lib/mocha.js:228:14)
    at Mocha.run (/Users/foo/data/src/webpack-merge/node_modules/mocha/lib/mocha.js:514:10)
    at Object.<anonymous> (/Users/foo/data/src/webpack-merge/node_modules/mocha/bin/_mocha:480:18)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
    at startup (internal/bootstrap/node.js:228:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-merge@4.1.4 test: `mocha tests/test-*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-merge@4.1.4 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
node -v
v10.1.0

I tried to remove all ^ from the module versions in package.json and do another npm i but that still fails.
Not sure what I'm doing wrong.

@bebraw
Copy link
Member

bebraw commented Sep 17, 2018

Please build the project first (npm run build). The tests should run after that.

Lately I've been thinking of porting the whole project to TS as that would simplify these sort of things.

@escapedcat
Copy link
Contributor Author

Stupid me, thx. I might add a PR to update the docs for future mes.

escapedcat added a commit to escapedcat/webpack-merge that referenced this issue Sep 18, 2018
bebraw added a commit that referenced this issue Sep 18, 2018
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

2 participants