nikgoodley-ibboost / js-test-driver

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

js Exception ReferenceError: runner.js on windows. any browser #343

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Write some tests - any test. For example
. . . . . . . . . . . . . . . . . giveGreeting.js:
function giveGreeting( name ){
    "use strict";
    var prefix = "hello ",
        greeting = prefix + name;
    return greeting;
}

. . . . . . . . . . . . . . . . . giveGreeting.js:
(function(){
    "use strict";   
    var tc = new TestCase("greeterTest", {
        "test something" : function(){
            var name = "Morgan",
                result = giveGreeting( name );
            assert( typeof result === "string" );
        }
    });
    return tc;
}());

2. Create a conf file - ours is 
server: http://localhost:4224

load:
  - ../../main/webapp/templates/js/giveGreeting.js

test:
  - tests/test-giveGreeting.js

timeout: 30

server: http://localhost:4224

load:
  - ../../main/webapp/templates/js/giveGreeting.js

test:
  - tests/test-giveGreeting.js

timeout: 30
3. start server, capture slave
4. run tests on a variety of browsers with
java -Xmx768M -Xms256M -jar JsTestDriver-1.3.4-a.jar --tests all --config 
ihdcc.conf --reset --captureConsole test-results -runnerMode DEBUG 
-captureConsole

What is the expected output? What do you see instead?
Firefox: Reset
Firefox: Reset
.Firefox 11.0: "Exception ReferenceError: test is not 
defined\nhttp://localhost:4224/static/runner.js(356):\n@http://loc
alhost:4224/static/runner.js:356\n([object 
Array])@http://localhost:4224/static/runner.js:356\nb([object Array])@http://
localhost:4224/static/jstestdrivernamespace.js:1\n([object 
Array])@http://localhost:4224/static/runner.js:356\nb([object
 Array])@http://localhost:4224/static/jstestdrivernamespace.js:1\n(\"{\\\"command\\\":\\\"execute\\\",\\\"parameters\\\"
:[\\\"test-results\\\"]}\",\"success\",[object 
XMLHttpRequest])@http://localhost:4224/static/runner.js:356\nb(\"{\\\"com
mand\\\":\\\"execute\\\",\\\"parameters\\\":[\\\"test-results\\\"]}\",\"success\
",[object XMLHttpRequest])@http://localh
ost:4224/static/jstestdrivernamespace.js:1\n([object Object],[object 
XMLHttpRequest],\"success\",\"{\\\"command\\\":\\\"
execute\\\",\\\"parameters\\\":[\\\"test-results\\\"]}\")@http://localhost:4224/
static/lib/jquery-min.js:141\n([object E
vent])@http://localhost:4224/static/lib/jquery-min.js:140\n"
Safari: Reset
Safari: Reset
.Safari 534.52.7: "Exception ReferenceError: Can't find variable: 
test\nundefined(undefined):\nundefined"

What version of the product are you using? On what operating system?
Windows 7 - the same setup does not cause errors in OS X

Thanks in advance.

Please provide any additional information below.

Original issue reported on code.google.com by fritzthe...@gmail.com on 1 Mar 2012 at 2:22