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

Karma with Webpack 2 raises errors about Promises #2227

Closed
jambonrose opened this issue Jul 1, 2016 · 2 comments · Fixed by #2256 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed

Karma with Webpack 2 raises errors about Promises #2227

jambonrose opened this issue Jul 1, 2016 · 2 comments · Fixed by #2256 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132

Comments

@jambonrose
Copy link

Expected behavior

Karma+Webpack2 runs without raising errors about Promises (especially when none of the tests or code use Promises).

Actual behavior

Each time Karma fetches a file with the webpack preprocessor, it raises the following warning:

Fetching src/ExampleTest.js
Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
    at then (node_modules/karma/lib/middleware/common.js:14:39)
    at node_modules/karma/lib/middleware/source_files.js:29:25
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at node_modules/karma/lib/middleware/karma.js:231:12
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at node_modules/karma/lib/middleware/strip_host.js:13:5
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at node_modules/karma/lib/middleware/stopper.js:9:50
    at call (node_modules/connect/index.js:239:7)

Enviroment Details

Karma 1.1.0 with Webpack 2 through Babel 6 on macOS 10.11.5 with npm 3.8.8 and node v5.11.0. Please see package.json for full requirements.

Steps to reproduce the behaviour

  1. Clone the example repo found at https://github.com/jambonsw/webpack2-karma-logging-error-mve
  2. Install the packages with npm install
  3. Run tests with npm test
@jambonrose
Copy link
Author

Forgot to mention: you can also see this behavior in the example output in #2217.

@shaharmor
Copy link
Contributor

Any update on this?

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