NicolasPelletier / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

auto reset when there is a syntax error in js file #269

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start a jstd server
2. run a test suite
3. change one of the js files by adding characters that will make the js code 
invalid/unparsable
4. rerun tests

What is the expected output? What do you see instead?

I want no tests to run and only the parse error to be printed. JSTD should also 
reset the client state as it might have been corrupted.

Currently some tests pass and a hard to spot error message with parser error is 
printed out and additionally future tests might fail because the client is in 
corrupted state. This is causing major stability issues.

What version of the product are you using? On what operating system?

1.3.2

Original issue reported on code.google.com by imi...@google.com on 8 Sep 2011 at 11:26

GoogleCodeExporter commented 9 years ago
I can verify this problem on 1.3.3c. 

A 'syntax error' can also be triggered by loading a javascript file that 
includes a reserved keyword (e.g. 'class'). (At least in Chrome 14) this will 
trigger the same behavior as an invalid character.

I also observed the problem of the client state becoming somehow corrupted. The 
browser would recognize changes in the file only after a restart of the jstd 
(standalone) server. 
At the same time the jstd client would report the error differently on 
subsequent runs of the same test file if the file was *not* modified.
It seems that the browser would fetch the invalid javascript resource from the 
cache on subsequent runs, however, with an empty content.

Again, this was on Chrome 14.

Original comment by mistae...@gmail.com on 17 Oct 2011 at 3:10