question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

karma runs rebuild too many times after updating entry file

See original GitHub issue

Here is my karma config:

module.exports = function (config) {
  config.set({
    browsers: ['Chrome'],
    singleRun: true,
    frameworks: [
      'mocha',
      'chai',
      'sinon'
    ],
    files: [
      'tests/unit/tests.js'
    ],
    plugins: [
      'karma-chrome-launcher',
      'karma-mocha',
      'karma-chai',
      'karma-sinon',
      'karma-sourcemap-loader',
      'karma-webpack',
      'karma-coverage'
    ],
    preprocessors: {
      'tests/unit/tests.js': [
        'webpack',
        'sourcemap'
      ]
    },
    reporters: [
      'progress',
      'coverage'
    ],
    webpack: {},
    coverageReporter: {
      type: 'html',
      dir: 'coverage/'
    }
  });
};

When I update ‘tests/unit/tests.js’, for example I add indent and then save this file, and after this I run “karma start” and after this in console output I see that webpack build runs about 19 times. Then I run “karma start” again and all works okay, webpack build runs only 1 time. Maybe you know why this happens?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

5reactions
pavel06081991commented, Apr 10, 2017

Is there any updates on this issue?

0reactions
codymikolcommented, Feb 3, 2021

Closing as this does not seem to be an issue in the 5.0.0 release, if anyone is still having problems, please free to open an issue and I’ll be happy to assist!

Read more comments on GitHub >

github_iconTop Results From Across the Web

karma runs rebuild too many times after updating entry file #223
We are seeing the same issue, it bundles multiple times even a small change is made, then when you re-run, it becomes normal....
Read more >
Angular CLI 6.0.0 and Karma: Karma server don't rebuild code ...
If I try to test changed code, the karma server doesn't rebuild the source and its currently testing the code it built first....
Read more >
Karma run test cases double times - Stack Overflow
With karma when I run test cases, every function which I test run two times. I knew this problem when I print console....
Read more >
Build Performance - webpack
This guide contains some useful tips for improving build/compilation performance. General. The following best practices should help, whether you're running ...
Read more >
7 Github Actions Tricks I Wish I Knew Before I Started
Here are 7 tricks with github actions that changed my life (or at least my CI/CD pipeline). These tricks helped me create a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found