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

Autowatch not working with karma-webpack on karma version 4.0 #3261

Open
Mighty683 opened this issue Feb 6, 2019 · 1 comment
Open

Autowatch not working with karma-webpack on karma version 4.0 #3261

Mighty683 opened this issue Feb 6, 2019 · 1 comment

Comments

@Mighty683
Copy link

Mighty683 commented Feb 6, 2019

  • Operating System: Linux Mint
  • Node Version: 10.15.1
  • NPM Version: 6.4.1
  • webpack Version: 3.6.0
  • karma-webpack Version: 3.0.5

Expected Behavior

Webpack rebuild bundle on file change when karma-webpack is used with Karma 4.0

Actual Behavior

Nothing happens, Karma notice file change, but test bundle don't change

Code

 // Part of my karma.conf.js

module.exports = function (config) {
  config.set({
    frameworks: ['mocha'],
    files: [{
      pattern: 'test/**/*.spec.js'
    }],

    preprocessors: {
      'test/**/*.spec.js': ['webpack', 'sourcemap']
    },

    webpack: {
      // ...
      module: {
        loaders: [
          {
            test: /\.js$/,
            loader: 'babel-loader',
            exclude: path.join(__dirname, 'node_modules')
          },
          {
            test: /\.vue$/,
            loader: 'vue-loader'
          }
        ]
      }
    },
    // ...
  }) 
}

How Do We Reproduce?

My karma config watches on files placed inside test folder. When I save change in folder, webpack doesn't get changes and test run on old files

#3226 - Seems to be connected with this issue.

Fix

Downgrade Karma to 3.1.4 version fixed the problem.

@perry-mitchell
Copy link

Still seeing this on v6.. autoWatch has no effect. Karma simply exits after running tests.

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