Merge pull request #4355 from tschaub/phantom-update

Update PhantomJS.
This commit is contained in:
Tim Schaub
2015-11-01 01:57:38 -07:00
5 changed files with 29 additions and 29 deletions
+9 -3
View File
@@ -1,5 +1,11 @@
language: python sudo: required
sudo: false dist: trusty
language: node_js
node_js:
- "4"
cache: cache:
directories: directories:
- node_modules - node_modules
@@ -7,8 +13,8 @@ env:
- DISPLAY=:99.0 - DISPLAY=:99.0
before_install: before_install:
- "npm install -g npm && npm install"
- "npm prune" - "npm prune"
- "sudo pip install -r requirements.txt"
before_script: before_script:
- "rm src/ol/renderer/webgl/*shader.js" - "rm src/ol/renderer/webgl/*shader.js"
+2 -2
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",
+1 -6
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
}; };
+16 -17
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,25 +46,21 @@
*/ */
goog.events.listen(this, 'test', function() {}); goog.events.listen(this, 'test', function() {});
if (window.mochaPhantomJS) { var runner = mocha.run();
mochaPhantomJS.run(); if (window.console && console.log) {
} else { // write stacks to the console for failed tests
var runner = mocha.run(); runner.on('fail', function(test, err) {
if (window.console && console.log) { if (test.duration > test._timeout) {
// write stacks to the console for failed tests var titles = [];
runner.on('fail', function(test, err) { for (var p = test; p; p = p.parent) {
if (test.duration > test._timeout) { if (p.title) {
var titles = []; titles.unshift(p.title);
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> </script>
<!-- <!--
+1 -1
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);