Update phantomjs and use mocha-phantomjs-core
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
<script type="text/javascript" src="../node_modules/proj4/dist/proj4.js"></script>
|
||||
<script type="text/javascript" src="test-extensions.js"></script>
|
||||
<script>
|
||||
if (typeof initMochaPhantomJS === 'function') {
|
||||
initMochaPhantomJS()
|
||||
}
|
||||
mocha.setup({
|
||||
ui: 'bdd',
|
||||
bail: false
|
||||
@@ -43,25 +46,21 @@
|
||||
*/
|
||||
goog.events.listen(this, 'test', function() {});
|
||||
|
||||
if (window.mochaPhantomJS) {
|
||||
mochaPhantomJS.run();
|
||||
} else {
|
||||
var runner = mocha.run();
|
||||
if (window.console && console.log) {
|
||||
// write stacks to the console for failed tests
|
||||
runner.on('fail', function(test, err) {
|
||||
if (test.duration > test._timeout) {
|
||||
var titles = [];
|
||||
for (var p = test; p; p = p.parent) {
|
||||
if (p.title) {
|
||||
titles.unshift(p.title);
|
||||
}
|
||||
var runner = mocha.run();
|
||||
if (window.console && console.log) {
|
||||
// write stacks to the console for failed tests
|
||||
runner.on('fail', function(test, err) {
|
||||
if (test.duration > test._timeout) {
|
||||
var titles = [];
|
||||
for (var p = test; p; p = p.parent) {
|
||||
if (p.title) {
|
||||
titles.unshift(p.title);
|
||||
}
|
||||
console.log('Test timed out:', titles.join(' > '));
|
||||
}
|
||||
console.error(test.err.stack);
|
||||
});
|
||||
}
|
||||
console.log('Test timed out:', titles.join(' > '));
|
||||
}
|
||||
console.error(test.err.stack);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
|
||||
@@ -10,7 +10,7 @@ var blue = 'data:image/gif;base64,R0lGODlhAQABAPAAAAAA/////yH5BAAAAAAALAAAAA' +
|
||||
'ABAAEAAAICRAEAOw==';
|
||||
|
||||
function itNoPhantom() {
|
||||
if (window.mochaPhantomJS) {
|
||||
if (window.initMochaPhantomJS) {
|
||||
return xit.apply(this, arguments);
|
||||
} else {
|
||||
return it.apply(this, arguments);
|
||||
|
||||
Reference in New Issue
Block a user