Karma crash after updating code
See original GitHub issueAfter I change something in my code while I run npm run test.watch
and npm run karma
in 2 different terminals the test shows no tests any more.
This is what I do:
- Run
npm run test.watch
- Run
npm run karma
(First time the test runs perfect) - I change something in the test like
expect(clickerApp['pages'].length).toEqual(3);
- I see that the test is running again and removed all my .js test files. and runned the test again without any tests so I get a empty table
npm run karma
> clicker@ karma /Users/martijnbakker/projects/clicker
> gulp --gulpfile test/gulpfile.ts --cwd ./ test.karma.debug
[15:42:44] Requiring external module ts-node/register
[15:42:48] sourced Ionic's gulpfile @ /Users/martijnbakker/projects/clicker/gulpfile.js
[15:42:48] Using gulpfile ~/projects/clicker/test/gulpfile.ts
[15:42:48] Starting 'test.karma.debug'...
18 04 2016 15:42:49.731:WARN [karma]: No captured browser, open http://localhost:9876/
18 04 2016 15:42:49.742:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
18 04 2016 15:42:49.746:INFO [launcher]: Starting browser Chrome
18 04 2016 15:42:50.996:INFO [Chrome 49.0.2623 (Mac OS X 10.11.2)]: Connected on socket /#XqiZQaZOP_vpedOJAAAA with id 72607031
START:
Click
✔ initialises with defaults
✔ initialises with overrides
Clicker
✔ initialises with the correct name
Utils
✔ resets a control
ClickerApp
✖ initialises with two possible pages
✔ initialises with a root page
✔ initialises with an app
✔ opens a page
ClickerButton
✔ initialises
✔ displays the clicker name and count
✔ does a click
ClickerForm
✔ initialises
✔ passes new clicker through to service
✔ doesn't try to add a clicker with no name
ClickerList
✔ initialises
Clickers
✔ initialises with empty clickers
✔ creates an instance of SqlStorage
✔ has empty ids with no storage
✔ has empty clickers with no storage
✔ can initialise a clicker from string
✔ returns undefined for a bad id
✔ adds a new clicker with the correct name
✔ removes a clicker by id
✔ does a click
✔ loads IDs from storage
✔ loads clickers from storage
Finished in 0.707 secs / 0.628 secs
SUMMARY:
✔ 25 tests completed
✖ 1 test failed
FAILED TESTS:
ClickerApp
✖ initialises with two possible pages
Chrome 49.0.2623 (Mac OS X 10.11.2)
Expected 2 to equal 3.
at Object.eval (/Users/martijnbakker/projects/clicker/www/build/test/app.spec.js:26:48)
--------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
--------------------------------|----------|----------|----------|----------|----------------|
test/ | 89.74 | 48.39 | 80 | 94.29 | |
app.js | 89.66 | 48.28 | 85.71 | 96 | 5 |
testUtils.js | 90 | 50 | 66.67 | 90 | 8 |
test/components/clickerButton/ | 85 | 48.28 | 100 | 93.75 | |
clickerButton.js | 85 | 48.28 | 100 | 93.75 | 5 |
test/components/clickerForm/ | 90.32 | 51.61 | 100 | 96.3 | |
clickerForm.js | 90.32 | 51.61 | 100 | 96.3 | 5 |
test/models/ | 100 | 100 | 100 | 100 | |
click.js | 100 | 100 | 100 | 100 | |
clicker.js | 100 | 100 | 100 | 100 | |
test/pages/clickerList/ | 86.96 | 48.28 | 100 | 94.74 | |
clickerList.js | 86.96 | 48.28 | 100 | 94.74 | 5 |
test/pages/page2/ | 82.35 | 48.28 | 75 | 92.31 | |
page2.js | 82.35 | 48.28 | 75 | 92.31 | 5 |
test/services/ | 93.75 | 51.61 | 90 | 96.59 | |
clickers.js | 96.3 | 51.61 | 100 | 98.65 | 5 |
utils.js | 80 | 100 | 40 | 85.71 | 6,8 |
--------------------------------|----------|----------|----------|----------|----------------|
All files | 91.34 | 50.54 | 91.18 | 96.02 | |
--------------------------------|----------|----------|----------|----------|----------------|
HERE I CHANGED APP.SPEC.TS
18 04 2016 15:43:02.247:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/app.spec.js".
18 04 2016 15:43:02.258:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/app.stub.js".
18 04 2016 15:43:02.267:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/testUtils.js".
18 04 2016 15:43:02.276:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/app.js".
18 04 2016 15:43:02.286:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/models/click.js".
18 04 2016 15:43:02.295:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/services/clickers.spec.js".
18 04 2016 15:43:02.305:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/components/clickerForm/clickerForm.js".
18 04 2016 15:43:02.314:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/models/clicker.js".
18 04 2016 15:43:02.324:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/gulpfile.js".
18 04 2016 15:43:02.333:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/services/clickers.js".
18 04 2016 15:43:02.342:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/pages/page2/page2.js".
18 04 2016 15:43:02.353:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/components/clickerButton/clickerButton.spec.js".
18 04 2016 15:43:02.360:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/models/click.spec.js".
18 04 2016 15:43:02.368:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/components/clickerButton/clickerButton.js".
18 04 2016 15:43:02.376:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/app.e2e.js".
18 04 2016 15:43:02.385:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/pages/clickerList/clickerList.e2e.js".
18 04 2016 15:43:02.394:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/services/utils.js".
18 04 2016 15:43:02.406:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/components/clickerForm/clickerForm.spec.js".
18 04 2016 15:43:02.424:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/pages/clickerList/clickerList.js".
18 04 2016 15:43:02.433:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/models/clicker.spec.js".
18 04 2016 15:43:02.440:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/pages/clickerList/clickerList.spec.js".
18 04 2016 15:43:02.447:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/services/utils.spec.js".
18 04 2016 15:43:02.454:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/config.js".
18 04 2016 15:43:02.461:INFO [watcher]: Removed file "/Users/martijnbakker/projects/clicker/www/build/test/pages/page2/page2.e2e.js".
===================================================================================================================================================================================================================================
START:
Finished in 0.006 secs / 0 secs
SUMMARY:
✔ 0 tests completed
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to prevent preprocessor error from crashing karma server
I upgraded from karma v2 to karma v4 and am having an issue where the karma server crashes if there is an error...
Read more >Troubleshooting - Karma test runner
Go to the captured browser and click the "DEBUG" button (or open http://localhost:9876/debug.html ) and use the web inspector to see what's going...
Read more >How to get around memory error with karma & phantomjs
It would appear as ERROR [launcher]: PhantomJS crashed. after the RAM for the process would exceed about 800-850 MB. There appears to be...
Read more >American Car Crash / Instant Karma / Road Rage Compilation ...
This is the 552nd compilation in the educational series that is all about USA Road Rage, Car Crashes, Brake Checks, Instant Karma, ...
Read more >Join the Credit Karma beta - TestFlight - Apple
When installing via public link, tap “Install” or “Update”. ... You'll be taken to a web page with a redemption code. Open TestFlight...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI #79 - I’ve finally figured out how to remove this horrible app stub, but it needs the latest version of Karma.
So when new Karma comes out this will no longer be a thing anyway…
Interesting, thanks for raising.
I’m going to be merging some fairly major changes in over the next few days, I’ll leave this open until after that is done and test it then.