Merge pull request #5006 from ahocevar/update-slimerjs

Use the maintained slimerjs package
This commit is contained in:
Andreas Hocevar
2016-03-10 13:53:52 +01:00
2 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
"proj4": "2.3.12", "proj4": "2.3.12",
"resemblejs": "2.2.0", "resemblejs": "2.2.0",
"sinon": "1.17.3", "sinon": "1.17.3",
"slimerjs-edge": "0.10.0-pre-3", "slimerjs": "0.906.1",
"wrench": "1.5.8" "wrench": "1.5.8"
}, },
"eslintConfig": { "eslintConfig": {
+18 -9
View File
@@ -6,7 +6,7 @@
var path = require('path'); var path = require('path');
var spawn = require('child_process').spawn; var spawn = require('child_process').spawn;
var slimerjs = require('slimerjs-edge'); var slimerjs = require('slimerjs');
var serve = require('./serve'); var serve = require('./serve');
var listen = require('./test').listen; var listen = require('./test').listen;
@@ -38,14 +38,23 @@ serve.createServer(function(err, server) {
url + '/test_rendering/index.html' url + '/test_rendering/index.html'
]; ];
// The current version of slimerjs is 0.9.6, but this version does not work // TODO
// for us because of https://github.com/laurentj/slimerjs/issues/333. This // Workaround for https://github.com/laurentj/slimerjs/issues/333. When a
// issue is now fixed in master and slimerjs-edge (nightly builds) works for // version with the fix is released, replace block below with:
// us. But we should use slimerjs instead of slimerjs-edge when a new // var child = spawn(slimerjs.path, args, {stdio: 'pipe'});
// release is published. // child.on('exit', function(code) {
var child = spawn(slimerjs.path, args, {stdio: 'inherit'}); // process.exit(code);
child.on('exit', function(code) { // }
process.exit(code);
var child = spawn(slimerjs.path, args, {stdio: 'pipe'});
child.stdout.on('data', function(data) {
process.stdout.write(data);
if (data == 'All tests passed.\n') {
process.exit(0);
}
});
child.on('exit', function() {
process.exit(1);
}); });
}); });