Skip to content

Commit

Permalink
https://github.com/qunitjs/qunit/issues/1389
Browse files Browse the repository at this point in the history
  • Loading branch information
giabao committed Apr 20, 2019
1 parent 2fcfa8c commit a5513af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
"url": "https://github.com/ohze/rangy.git"
},
"scripts": {
"clean": "rimraf dist",
"postinstall": "echo 'https://github.com/qunitjs/qunit/issues/1389' && patch -i qunit.patch node_modules/qunit/qunit/qunit.js",
"clean": "rimraf dist .rpt2_cache",
"tsc:scripts": "tsc -b scripts/tsconfig.json",
"tsc:src": "node $NODE_DEBUG_OPTION scripts/tsc.js",
"tsc:test": "tsc -b test/",
"dist-prepare": "node scripts/dist-prepare.js",
"rollup:src": "rollup -c scripts/rollup.config.js",
"rollup:test": "rollup -c scripts/rollup.config.test.js",
"prebuild": "yarn run tsc:scripts",
"build:src": "npm-run-all tsc:src rollup:src",
"build:test": "npm-run-all --parallel tsc:test rollup:test",
"build": "npm-run-all --parallel build:*",
"prerelease": "npm-run-all clean tsc:scripts --parallel build:* dist-prepare",
"build": "run-s tsc:scripts build:src build:test",
"prerelease": "run-s clean build dist-prepare",
"release": "node scripts/publish.js",
"watch:src": "TODO FORCE_COLOR=1 rollup -c --watch",
"watch": "TODO run-p -l watch:types watch:js",
Expand Down
11 changes: 11 additions & 0 deletions qunit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- node_modules/qunit/qunit/qunit.orig.js 2019-04-13 13:02:25.000000000 +0700
+++ node_modules/qunit/qunit/qunit.js 2019-04-20 12:10:07.000000000 +0700
@@ -3996,7 +3996,7 @@
expected = String(expected);

// Expected is a constructor, maybe an Error constructor
- } else if (expectedType === "function" && actual instanceof expected) {
+ } else if (expectedType === "function" && expected.prototype !== undefined && actual instanceof expected) {
result = true;

// Expected is an Error object

0 comments on commit a5513af

Please sign in to comment.