Update phantomjs and use mocha-phantomjs-core

This commit is contained in:
Tim Schaub
2015-11-01 01:45:47 -06:00
parent 7946298e67
commit 98c9b0eb39
4 changed files with 20 additions and 26 deletions

View File

@@ -60,9 +60,9 @@
"jquery": "2.1.1", "jquery": "2.1.1",
"jshint": "2.8.0", "jshint": "2.8.0",
"mocha": "1.21.5", "mocha": "1.21.5",
"mocha-phantomjs": "3.5.1", "mocha-phantomjs-core": "^1.2.1",
"mustache": "2.1.3", "mustache": "2.1.3",
"phantomjs": "1.9.10", "phantomjs": "1.9.18",
"proj4": "2.3.12", "proj4": "2.3.12",
"resemblejs": "1.2.0", "resemblejs": "1.2.0",
"sinon": "1.10.3", "sinon": "1.10.3",

View File

@@ -58,10 +58,7 @@ function runTests(includeCoverage, callback) {
var address = server.address(); var address = server.address();
var url = 'http://' + address.address + ':' + address.port; var url = 'http://' + address.address + ':' + address.port;
var args = [ var args = [
path.join( require.resolve('mocha-phantomjs-core'),
__dirname,
'../node_modules/mocha-phantomjs/lib/mocha-phantomjs.coffee'
),
url + '/test/index.html' url + '/test/index.html'
]; ];
@@ -88,5 +85,3 @@ module.exports = {
runTests: runTests, runTests: runTests,
listen: listen listen: listen
}; };

View File

@@ -16,6 +16,9 @@
<script type="text/javascript" src="../node_modules/proj4/dist/proj4.js"></script> <script type="text/javascript" src="../node_modules/proj4/dist/proj4.js"></script>
<script type="text/javascript" src="test-extensions.js"></script> <script type="text/javascript" src="test-extensions.js"></script>
<script> <script>
if (typeof initMochaPhantomJS === 'function') {
initMochaPhantomJS()
}
mocha.setup({ mocha.setup({
ui: 'bdd', ui: 'bdd',
bail: false bail: false
@@ -43,9 +46,6 @@
*/ */
goog.events.listen(this, 'test', function() {}); goog.events.listen(this, 'test', function() {});
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
var runner = mocha.run(); var runner = mocha.run();
if (window.console && console.log) { if (window.console && console.log) {
// write stacks to the console for failed tests // write stacks to the console for failed tests
@@ -62,7 +62,6 @@
console.error(test.err.stack); console.error(test.err.stack);
}); });
} }
}
</script> </script>
<!-- <!--
Tests should not depend on any specific markup and should instead create Tests should not depend on any specific markup and should instead create

View File

@@ -10,7 +10,7 @@ var blue = 'data:image/gif;base64,R0lGODlhAQABAPAAAAAA/////yH5BAAAAAAALAAAAA' +
'ABAAEAAAICRAEAOw=='; 'ABAAEAAAICRAEAOw==';
function itNoPhantom() { function itNoPhantom() {
if (window.mochaPhantomJS) { if (window.initMochaPhantomJS) {
return xit.apply(this, arguments); return xit.apply(this, arguments);
} else { } else {
return it.apply(this, arguments); return it.apply(this, arguments);