I am writing test with funcunit and running it with testee. I can run the test successfully on my local machine, but when I run it on jenkins, it has loading error.
testee:html-injector injecting scripts into file +783ms /node_modules/testee/node_modules/launchpad/node_modules/dtrace-provider/package.json
testee:html-injector injecting scripts into file +391ms /node_modules/testee/node_modules/dtrace-provider/package.json
testee:html-injector injecting scripts into file +148ms /steal-qunit.js
testee:html-injector injecting scripts into file +1ms /funcunit.js
testee:runner CONSOLE: error Error loading "steal-qunit" at http://localhost:3996/steal-qunit.js
Error loading "steal-qunit" from "tests/test" at http://localhost:3996/tests/test.js
Not Found: http://localhost:3996/steal-qunit.js undefined
+2ms http://localhost:3996/tests/test.html?__token=8jf57q { browser: 'phantom' }
testee:runner CONSOLE: Potentially unhandled rejection [17] Error loading "steal-qunit" at http://localhost:3996/steal-qunit.js
Error loading "steal-qunit" from "tests/test" at http://localhost:3996/tests/test.js
Not Found: http://localhost:3996/steal-qunit.js (WARNING: non-Error used)
+0ms http://localhost:3996/tests/test.html?__token=8jf57q { browser: 'phantom' }
testee:html-injector injecting scripts into file +54ms /jquery.js
testee:html-injector injecting scripts into file +1ms /steal-qunit.js
testee:html-injector injecting scripts into file +0ms /funcunit.js
testee:runner CONSOLE: loading or loaded
CONSOLE: loading or loaded
CONSOLE: loading or loaded
steal-qunit.js, jquery.js, and funcunit.js should loaded from node_modules directory, but testee is looking at root directory to find them. Can anyone help me out for this issue?
The main test javascript file looks like:
var QUnit = require('steal-qunit'),
F = require('funcunit');
And each test file has this at the top of the file.
require('jquery');
require('steal-qunit');
Aucun commentaire:
Enregistrer un commentaire