karma-runner/karma

Karma should start a new browser instance when disconnected by a SyntaxError

Open

#2,874 建立於 2017年11月12日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (11,918 star) (1,703 fork)batch import
help wanted

描述

Expected behaviour

I would expect that karma would close the current connection and automatically launch another browser instance when it sees another change in the files that it is watching.

HeadlessChrome 0.0.0 (Mac OS X 10.11.6) ERROR
  Uncaught SyntaxError: Unexpected identifier
  at event_sequencing.js:52


HeadlessChrome 0.0.0 (Mac OS X 10.11.6): Executed 0 of 5 SUCCESS (0 secs / 0 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.11.6): Executed 5 of 5 SUCCESS (0.012 secs / 0.005 secs)
12 11 2017 08:26:17.933:INFO [watcher]: Changed file "/Users/williamrusnack/Documents/event_sequencing/test.js".

Actual behaviour

Karma instead continues to try and connect to the disconnect browser session when it knows that it has lost the connection.

HeadlessChrome 0.0.0 (Mac OS X 10.11.6) ERROR
  Uncaught SyntaxError: Unexpected identifier
  at event_sequencing.js:52


HeadlessChrome 0.0.0 (Mac OS X 10.11.6): Executed 0 of 5 SUCCESS (0 secs / 0 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.11.6) ERROR
  Disconnected, because no message in 10000 ms.
HeadlessChrome 0.0.0 (Mac OS X 10.11.6): Executed 0 of 5 DISCONNECTED (10.005 secs / 0 secs)
12 11 2017 08:44:02.222:INFO [watcher]: Changed file "/Users/williamrusnack/Documents/event_sequencing/test.js".
12 11 2017 08:44:02.480:WARN [karma]: No captured browser, open http://localhost:9876/

Environment Details

HeadlessChrome 0.0.0 (Mac OS X 10.11.6) Karma version: 1.7.1

Steps to reproduce the behaviour

Include any syntax error in the javascript test file or the file to be tested that causes the browser to disconnect.

貢獻者指南