Preprocessor failure should cancel (not even start) the execution #550

Closed
hlship opened this Issue May 15, 2013 · 5 comments

Comments

Projects
None yet
4 participants

hlship commented May 15, 2013

When I have errors in my CoffeeScript, I see two problems:

  1. The compilation error is reported without a line number, making it hard to chase down the problem.
INFO [watcher]: Changed file "/Users/hlship/workspaces/annadale/nexus/client/novate-console/src/test/unit/api-services-spec.coffee".
ERROR [preprocess.coffee]: unexpected INDENT
  at /Users/hlship/workspaces/annadale/nexus/client/novate-console/src/test/unit/api-services-spec.coffee
Chrome 26.0 (Mac) LOG: '{\n  "a": 1,\n  "b": 2\n}'
Chrome 26.0 (Mac): Executed 5 of 5 SUCCESS (0.457 secs / 0.068 secs)
  1. The test runner reports success for the tests that did run; however, the test run should be a failure if any sources could not be compiled. In the above, the 5 tests that ran passed, but there were another 7 that never executed due to the compilation error.

This is in Karma 0.8.5.

@vojtajina vojtajina referenced this issue in karma-runner/karma-coffee-preprocessor Jun 7, 2013

Open

Better error reporting #4

Contributor

vojtajina commented Jun 7, 2013

Totally. I created a separate issue for the coffee-preprocessor plugin (to report line numbers).

Any failure during preprocessing should fail the whole run. Probably even not run.

Contributor

vojtajina commented Nov 16, 2013

Just updated the issue title.

nc commented Dec 4, 2013

+1

Neppord commented Jan 22, 2014

1+

@vojtajina vojtajina closed this in 4d669bf Feb 5, 2014

Contributor

vojtajina commented Feb 5, 2014

I fixed this in the coffee preprocessor, but it will be available with Karma 0.12, as this is a breaking change (it's in https://github.com/karma-runner/karma-coffee-preprocessor/tree/preprocessor-error-karma-0.11.14).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment