mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Switch to QUnit 1.20 (bower), and implement a workaround for hidepassed issues.
This commit is contained in:
parent
7328e829b7
commit
e9d575e8b1
4 changed files with 16 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"straps": "~1.7.2",
|
"straps": "~1.7.2",
|
||||||
"acorn": "~0.5.0",
|
"acorn": "~0.5.0",
|
||||||
|
"qunit": "~1.20.0",
|
||||||
"stats.js": "r14"
|
"stats.js": "r14"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-qunit": "^1.2.1",
|
"gulp-qunit": "^1.2.1",
|
||||||
"prepro": "~0.9.1",
|
"prepro": "~0.9.1",
|
||||||
"qunitjs": "~1.15.0",
|
|
||||||
"uglify-js": "~2.4.24"
|
"uglify-js": "~2.4.24"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Paper.js Tests</title>
|
<title>Paper.js Tests</title>
|
||||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
<link rel="stylesheet" href="../bower_components/qunit/qunit/qunit.css">
|
||||||
<script type="text/javascript" src="../node_modules/qunitjs/qunit/qunit.js"></script>
|
<script type="text/javascript" src="../bower_components/qunit/qunit/qunit.js"></script>
|
||||||
<script type="text/javascript" src="js/helpers.js"></script>
|
<script type="text/javascript" src="js/helpers.js"></script>
|
||||||
<script type="text/javascript" src="../src/load.js"></script>
|
<script type="text/javascript" src="../src/load.js"></script>
|
||||||
<script type="text/javascript" src="tests/load.js"></script>
|
<script type="text/javascript" src="tests/load.js"></script>
|
||||||
|
|
|
@ -10,6 +10,19 @@
|
||||||
* All rights reserved.
|
* 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.
|
// Register a jsDump parser for Base.
|
||||||
QUnit.jsDump.setParser('Base', function (obj, stack) {
|
QUnit.jsDump.setParser('Base', function (obj, stack) {
|
||||||
// Just compare the string representation of classes inheriting from Base,
|
// Just compare the string representation of classes inheriting from Base,
|
||||||
|
|
Loading…
Reference in a new issue