Add a routing test using proxyquire to short-circuit history handlers

* proxyquire (pq) replaces choo's sheet-router/history with a mock
* pq-universal replaces pq w/ pqify in the browser
* magic!
This commit is contained in:
Ben Drucker
2016-07-04 16:19:17 -07:00
parent fb38d151c6
commit 37976c86f5
2 changed files with 66 additions and 2 deletions
+6 -2
View File
@@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"deps": "dependency-check . && dependency-check . --extra --no-dev -i xhr",
"test:electron": "browserify tests/**/*.js -t es2020 | tape-run",
"test:cov": "browserify tests/**/*.js -t es2020 -p tape-istanbul/plugin | tape-run | tape-istanbul && istanbul report",
"test:electron": "browserify tests/**/*.js -t es2020 -p proxyquire-universal | tape-run",
"test:cov": "browserify tests/**/*.js -t es2020 -p proxyquire-universal -p tape-istanbul/plugin | tape-run | tape-istanbul && istanbul report",
"test:server": "standard && npm run deps && NODE_ENV=test node tests/server/*",
"test:browser": "standard && npm run deps && NODE_ENV=test zuul tests/browser/*",
"test:browser:local": "standard && npm run deps && NODE_ENV=test zuul --local 8080 -- tests/browser/*",
@@ -40,10 +40,14 @@
"bundle-collapser": "^1.2.1",
"dependency-check": "^2.5.1",
"es2020": "^1.0.1",
"geval": "~2.1.1",
"insert-css": "^0.2.0",
"istanbul": "^0.4.4",
"karma-sauce-launcher": "^1.0.0",
"min-document": "~2.18.0",
"proxyquire": "~1.7.10",
"proxyquire-universal": "~1.0.8",
"proxyquireify": "~3.2.0",
"server-router": "^2.1.0",
"sheetify": "^5.0.0",
"standard": "^7.1.0",