karma-runner / karma-runner/karma

Stop Rerunning automatically test on previous version after changes

Open
#2,778 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Expected behaviour
When I run tests, Karma does the job (on the good version that I called version_one).
When I make changes and run tests, Karma runs the test on the new version, including the changes.

### Actual behaviour
When I run tests, Karma does the job (on the good version that I called version_one).
When I make changes and run tests, Karma runs the test on version_one instead of the new version, including the changes.
When I rerun the test, it works (tests run on the last changed version).

### Environment Details
IntelliJ Idea Ultimate, with plugin Karma

- Karma version (output of `karma --version`):
1.7.0
- Relevant part of your `karma.config.js` file
const webpackConfig = require('../../build/webpack.test.conf');

module.exports = (config) => {

config.set({
browsers: ['PhantomJS'],
frameworks: ['mocha', 'promise', 'sinon-chai', 'phantomjs-shim'],
reporters: ['spec', 'coverage'],
files: ['./index.js'],
preprocessors: {
'./index.js': ['webpack', 'sourcemap'],
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
},
coverageReporter: {
dir: './coverage',
reporters: [
{ type: 'lcov', subdir: '.' },
{ type: 'text-summary' },
],
},
});

};

### Steps to reproduce the behaviour

1. Go on IntelliJ Idea and add plugin Karma
2. "Edit configuration" : configure tests (ctrl+R on Mac, Maj+F10 on Win/Linux)
3. Add Karma.conf.js as configuration file ; no browser, node interpreter : use yours, karma package : link to your karma package
4. Run test : ctrl+R on Mac, Maj+F10 on Win/Linux
5. make obvious change that fails an unit test
6. Run test again : ctrl+R on Mac, Maj+F10 on Win/Linux

thanks

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior through the IntelliJ IDEA Karma plugin using the mentioned karma.config.js, ./index.js, and build/webpack.test.conf setup. Start by running the listed steps and compare the first and second test runs after a failing change. Done means the first rerun executes the changed version rather than version_one.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.