6ev4uk / js-test-driver

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

jQuery, jasmine, coverage plugin, and Safari causes "RangeError: Maximum call stack size exceeded." #327

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is my jsTestDriver.conf:

server: http://localhost:9876

load:
  - test-lib/jasmine.js
  - lib/js/jquery/jquery-1.6.2.min.js

plugin:
 - name: "coverage"
   jar: "/export/js-test-server/coverage-1.3.3d.jar"
   module: "com.google.jstestdriver.coverage.CoverageModule"

The result of running loading this in Safari is:

Safari 534.52.7 Mac OS loaded 
/test/com/google/jstestdriver/coverage/javascript/LCOV.js
Safari 534.52.7 Mac OS loaded /test/test-lib/jasmine.js
Safari 534.52.7 Mac OS loaded /test/lib/js/jquery/jquery-1.6.2.min.js
Safari 534.52.7 Mac OS loaded /test/test-lib/jasmine.js
[ERROR] error loading file: /test/lib/js/jquery/jquery-1.6.2.min.js:2441: 
RangeError: Maximum call stack size exceeded.
Safari 534.52.7 Mac OS loaded 
/test/com/google/jstestdriver/coverage/javascript/LCOV.js
Total 0 tests (Passed: 0; Fails: 0; Errors: 0) (0.00 ms)
  Safari 534.52.7 Mac OS: Run 1 tests (Passed: 0; Fails: 0; Errors 1) (0.00 ms)
    error loading file: /test/lib/js/jquery/jquery-1.6.2.min.js:2441: RangeError: Maximum call stack size exceeded.
Tests failed: Tests failed. See log for details.

The result of --runnerMode=DEBUG is attached.

Original issue reported on code.google.com by devin.ba...@gmail.com on 12 Jan 2012 at 1:39

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This is keeping us from running our Jasmine specs on Safari using jsTestDriver. 
 Any idea of the cause?

The failing Safari is version 5.1.2 (64-bit).

The error message I see from JSTD is:

  Safari 534.52.7 Mac OS: Run 1 tests (Passed: 0; Fails: 0; Errors 1) (0.00 ms)
    error loading file: /test/vendor/assets/javascripts/jquery.js:2441: RangeError: Maximum call stack size exceeded.

This may work fine on an older Safari I have access to (5.0.3, also 64-bit).  I 
still need to investigate that further, however.

Original comment by benjamin...@gmail.com on 22 Feb 2012 at 2:45

GoogleCodeExporter commented 8 years ago
This is due to js-test-runner loading scripts more than 1 time when code 
coverage is on. I do not see the same behavior in say Chrome.

Original comment by ehu...@mobileiron.com on 5 Jul 2012 at 7:27

GoogleCodeExporter commented 8 years ago
Did this get sorted out meanwhile? I would need a solution for this. Over here, 
the Jasmine script gets into an infinite settimeout, and the result is the same 
thing, and it only occurs if the coverage plugin is plugged in.

Original comment by rocska.a...@gmail.com on 1 Mar 2014 at 5:11