Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/javascript/testrunner.js')
-rw-r--r--tests/javascript/testrunner.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/javascript/testrunner.js b/tests/javascript/testrunner.js
index 61ca183f97..5b333a8a29 100644
--- a/tests/javascript/testrunner.js
+++ b/tests/javascript/testrunner.js
@@ -22,10 +22,10 @@
// IN THE SOFTWARE
var fs = require("fs");
-var url = 'http://localhost/tests/javascript';
+var url = 'http://localhost/tests/javascript/';
function printError(message) {
- fs.write("/dev/stderr", message + "\n", "w");
+ fs.write("/dev/stderr", message + "\n", "w");
}
var page = require("webpage").create();
@@ -38,7 +38,7 @@ page.onResourceReceived = function() {
page.evaluate(function() {
if (!window.QUnit || window.phantomAttached) return;
- QUnit.config.done.push(function(obj) {
+ QUnit.done(function(obj) {
console.log("Tests passed: " + obj.passed);
console.log("Tests failed: " + obj.failed);
console.log("Total tests: " + obj.total);
@@ -47,6 +47,8 @@ page.onResourceReceived = function() {
window.phantomResults = obj;
});
+ window.phantomAttached = true;
+
QUnit.log(function(obj) {
if (!obj.result) {
var errorMessage = "Test failed in module " + obj.module + ": '" + obj.name + "' \nError: " + obj.message;
@@ -64,8 +66,6 @@ page.onResourceReceived = function() {
console.log(errorMessage);
}
});
-
- window.phantomAttached = true;
});
}