c9-core/node_modules/msgpack-js-browser/test.js

28 wiersze
556 B
JavaScript
Czysty Zwykły widok Historia

2017-05-14 11:22:31 +00:00
#!/usr/bin/env phantomjs
var page = require('webpage').create();
page.onConsoleMessage = function (msg) {
console.log(msg);
};
page.onError = function (msg, trace) {
console.log(msg);
trace.forEach(function(item) {
console.log(' ', item.file, ':', item.line);
});
phantom.exit(1);
};
page.onLoadFinished = function (status) {
if (status !== "success") {
console.log("page.open failed");
phantom.exit(2);
}
console.log("All tests passed!");
phantom.exit();
};
console.log('Loading test page');
page.open("./index.html");