Fix usage of mocha-phantomjs-core after update
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@
|
|||||||
"jquery": "2.1.4",
|
"jquery": "2.1.4",
|
||||||
"jshint": "2.8.0",
|
"jshint": "2.8.0",
|
||||||
"mocha": "2.3.3",
|
"mocha": "2.3.3",
|
||||||
"mocha-phantomjs-core": "1.2.1",
|
"mocha-phantomjs-core": "^1.3.0",
|
||||||
"mustache": "2.2.0",
|
"mustache": "2.2.0",
|
||||||
"phantomjs": "1.9.18",
|
"phantomjs": "1.9.18",
|
||||||
"proj4": "2.3.12",
|
"proj4": "2.3.12",
|
||||||
|
|||||||
+9
-3
@@ -59,14 +59,20 @@ function runTests(includeCoverage, callback) {
|
|||||||
var url = 'http://' + address.address + ':' + address.port;
|
var url = 'http://' + address.address + ':' + address.port;
|
||||||
var args = [
|
var args = [
|
||||||
require.resolve('mocha-phantomjs-core'),
|
require.resolve('mocha-phantomjs-core'),
|
||||||
url + '/test/index.html'
|
url + '/test/index.html',
|
||||||
|
'spec'
|
||||||
];
|
];
|
||||||
|
var config = {
|
||||||
|
ignoreResourceErrors: true,
|
||||||
|
useColors: true,
|
||||||
|
};
|
||||||
|
|
||||||
if (includeCoverage) {
|
if (includeCoverage) {
|
||||||
args.push('spec', '{"hooks": "' +
|
config.hooks = path.join(__dirname, '../test/phantom_hooks.js');
|
||||||
path.join(__dirname, '../test/phantom_hooks.js') + '"}');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args.push(JSON.stringify(config));
|
||||||
|
|
||||||
var child = spawn(phantomjs.path, args, {stdio: 'inherit'});
|
var child = spawn(phantomjs.path, args, {stdio: 'inherit'});
|
||||||
child.on('exit', function(code) {
|
child.on('exit', function(code) {
|
||||||
callback(code);
|
callback(code);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ var blue = 'data:image/gif;base64,R0lGODlhAQABAPAAAAAA/////yH5BAAAAAAALAAAAA' +
|
|||||||
'ABAAEAAAICRAEAOw==';
|
'ABAAEAAAICRAEAOw==';
|
||||||
|
|
||||||
function itNoPhantom() {
|
function itNoPhantom() {
|
||||||
if (window.initMochaPhantomJS) {
|
if (window.checkForMocha) {
|
||||||
return xit.apply(this, arguments);
|
return xit.apply(this, arguments);
|
||||||
} else {
|
} else {
|
||||||
return it.apply(this, arguments);
|
return it.apply(this, arguments);
|
||||||
|
|||||||
Reference in New Issue
Block a user