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

cannot run tests given dependencies specified in package.json #11

Closed
okize opened this issue Nov 16, 2016 · 2 comments
Closed

cannot run tests given dependencies specified in package.json #11

okize opened this issue Nov 16, 2016 · 2 comments

Comments

@okize
Copy link

okize commented Nov 16, 2016

I wanted to commit a bugfix but after checking out this repo and running npm install I cannot run the tests:

$ npm run test

> [email protected] test /Users/.../src/sass-variables-loader
> ./node_modules/karma/bin/karma start

(node:26296) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
WARN [preprocess]: Can not load "webpack"!
  TypeError: this.emitter.refreshFiles is not a function
    at Plugin.notifyKarmaAboutChanges (/Users/.../src/sass-variables-loader/node_modules/karma-webpack/lib/karma-webpack.js:143:16)
    at Plugin.<anonymous> (/Users/.../src/sass-variables-loader/node_modules/karma-webpack/lib/karma-webpack.js:98:12)
    at Compiler.applyPlugins (/Users/.../src/sass-variables-loader/node_modules/tapable/lib/Tapable.js:26:37)
    at Watching._done (/Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:78:17)
    at Watching.<anonymous> (/Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:61:18)
    at Compiler.emitRecords (/Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:282:37)
    at Watching.<anonymous> (/Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:58:19)
    at /Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:275:11
    at Compiler.applyPluginsAsync (/Users/.../src/sass-variables-loader/node_modules/tapable/lib/Tapable.js:60:69)
    at Compiler.afterEmit (/Users/.../src/sass-variables-loader/node_modules/webpack/lib/Compiler.js:272:8)
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 54.0.2840 (Mac OS X 10.11.6)]: Connected on socket g5Y3BsovhGU7c1vcA1KZ with id 93899725
Chrome 54.0.2840 (Mac OS X 10.11.6) ERROR
  Uncaught ReferenceError: require is not defined
  at /Users/.../src/sass-variables-loader/karma.js:2
Chrome 54.0.2840 (Mac OS X 10.11.6): Executed 0 of 0 ERROR (0.052 secs / 0 secs)

which looks like this error:

codymikol/karma-webpack#70

upgrading karma as suggested in that thread led me to a different error:

$ npm run test

> [email protected] test /Users/.../src/sass-variables-loader
> karma start

TypeError: Cannot read property 'visitClass' of undefined
    at monkeypatch (/Users/.../src/sass-variables-loader/node_modules/babel-eslint/index.js:199:40)
    at Object.exports.parse (/Users/.../src/sass-variables-loader/node_modules/babel-eslint/index.js:410:5)
    at parse (/Users/.../src/sass-variables-loader/node_modules/eslint/lib/eslint.js:453:27)
    at EventEmitter.module.exports.api.verify (/Users/.../src/sass-variables-loader/node_modules/eslint/lib/eslint.js:607:15)
    at processText (/Users/.../src/sass-variables-loader/node_modules/eslint/lib/cli-engine.js:201:27)
    at CLIEngine.executeOnText (/Users/.../src/sass-variables-loader/node_modules/eslint/lib/cli-engine.js:361:26)
    at lint (/Users/.../src/sass-variables-loader/node_modules/eslint-loader/index.js:26:20)
    at Object.module.exports (/Users/.../src/sass-variables-loader/node_modules/eslint-loader/index.js:120:7)
    at WEBPACK_CORE_LOADER_EXECUTION (/Users/.../src/sass-variables-loader/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/Users/.../src/sass-variables-loader/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/Users/.../src/sass-variables-loader/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /Users/.../src/sass-variables-loader/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/Users/.../src/sass-variables-loader/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /Users/.../src/sass-variables-loader/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3)

which looks like this error:

babel/babel-eslint#243

@giogonzo
Copy link
Member

Hi @okize , thanks for digging into this!

The test setup here is very outdated.. I just pushed 06d00ae which should at least let you run tests. Let me know if it works for you

@okize
Copy link
Author

okize commented Nov 16, 2016

@giogonzo yes! tests are running now, thanks for the quick turnaround!

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