diff --git a/bower.json b/bower.json index 4101c672..a923f893 100644 --- a/bower.json +++ b/bower.json @@ -26,6 +26,7 @@ "devDependencies": { "straps": "~1.7.2", "acorn": "~0.5.0", + "qunit": "~1.20.0", "stats.js": "r14" }, "keywords": [ diff --git a/package.json b/package.json index 2b7046b9..25e527ff 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "gulp": "^3.9.0", "gulp-qunit": "^1.2.1", "prepro": "~0.9.1", - "qunitjs": "~1.15.0", "uglify-js": "~2.4.24" }, "keywords": [ diff --git a/test/index.html b/test/index.html index de2731c9..44e9102e 100644 --- a/test/index.html +++ b/test/index.html @@ -2,8 +2,8 @@ Paper.js Tests - - + + diff --git a/test/js/helpers.js b/test/js/helpers.js index 656d3988..87d14a5c 100644 --- a/test/js/helpers.js +++ b/test/js/helpers.js @@ -10,6 +10,19 @@ * All rights reserved. */ +// Until window.history.pushState() works when running locally, we need to trick +// qunit into thinking that the feature is not present. This appears to work... +// TODO: Ideally we should fix this in QUnit instead. +delete window.history; +window.history = {}; + +QUnit.begin(function() { + if (/hidepassed/.test(document.location.href)) { + QUnit.config.hidepassed = true; + document.getElementById('qunit-tests').className += ' hidepass'; + } +}); + // Register a jsDump parser for Base. QUnit.jsDump.setParser('Base', function (obj, stack) { // Just compare the string representation of classes inheriting from Base,