karma-runner / karma-runner/karma

Tests Cached giving wrong results

Open
#1,087 43 comments 21 reactions 0 assignees View on GitHub
needs: feedback-from-author needs: investigation
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

When using karma with angular and component.io I get some very weird behaviour and would like to know whether this is actually an issue or something i can change.

The first test runs fine and shows e.g. tests running successfully. I then change code (e.g. comment out a line and save) which causes my build.js to be rebuilt which causes karma test runner to pick up this change and re-run the tests which also shows the defect in the appropriate tests. So far so good.

The issue comes when then doing another change (e.g. commenting the line back in). It still fails and keeps failing until I either restart karma (was running in ci mode) or open a new tab with debug mode. When opening a new debug tab it shows the correct console log with all successful tests.

When opening up the scripts of the first tabs in the developer section in chrome it shows that the code (e.g. build.js) is still the old code and not correctly updated. Opening a new tab as described above actually triggers a reload.

I tried to delay the batch start, I tried to comment out the caching behaviour in karma, I tried to ensure that chromes caches are disabled) all to no avail.

Anybody any hints ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.