Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: tap @ 13.1.3 .. 13.1.6

bin/run.js

@@ -238,7 +238,7 @@
'--functions=' + options.functions,
'--lines=' + options.lines,
'--statements=' + options.statements,
- '--reporter=' + reporter,
+ (options['no-coverage-report'] ? '--silent' : `--reporter=${reporter}`),
'--extension=.js',
'--extension=.jsx',
'--extension=.mjs',

lib/base.js

@@ -48,6 +48,8 @@
this.hook = new TapWrap(this)
this.hook.runInAsyncScope(() =>
this.hookDomain = new Domain((er, type) => {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = type
this.threw(er)
}))
@@ -142,6 +144,8 @@
threw (er, extra, proxy) {
this.hook.emitDestroy()
this.hookDomain.destroy()
+ if (!er || typeof er !== 'object')
+ er = { error: er }
if (this.name && !proxy)
er.test = this.name

lib/tap.js

@@ -13,6 +13,8 @@
if (!processPatched)
throw er
else {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = type
tap.threw(er)
}

lib/test.js

@@ -368,6 +368,8 @@
try {
return this.cb(this)
} catch (er) {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = 'testFunctionThrow'
this.threw(er)
}
@@ -377,6 +379,8 @@
this.promise = ret
ret.tapAbortPromise = done
ret.then(end, er => {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = 'returnedPromiseRejection'
done(er)
})
@@ -504,6 +508,8 @@
const otd = p.onTeardown
p.onTeardown = []
const threw = er => {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = 'teardown'
delete p.options.time
p.threw(er)
@@ -516,6 +522,8 @@
p.onTeardown = otd.slice(i + 1)
this.queue.unshift(['emitSubTeardown', p])
return ret.then(() => this.emitSubTeardown(p), er => {
+ if (!er || typeof er !== 'object')
+ er = { error: er }
er.tapCaught = 'teardown'
throw er
})
@@ -823,6 +831,9 @@
return
}
+ if (!er || typeof er !== 'object')
+ er = { error: er }
+
if (this[_expectUncaught].length && er.tapCaught === 'uncaughtException') {
const [wanted, message, extra] = this[_expectUncaught].shift()
const actual = isRegExp(wanted) ? er.message : er

package.json

@@ -1,6 +1,6 @@
{
"name": "tap",
- "version": "13.1.3",
+ "version": "13.1.6",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"description": "A Test-Anything-Protocol library",
"homepage": "http://node-tap.org/",
@@ -19,7 +19,7 @@
"bind-obj-methods": "^2.0.0",
"browser-process-hrtime": "^1.0.0",
"capture-stack-trace": "^1.0.0",
- "chokidar": "^2.1.5",
+ "chokidar": "^3.0.0",
"color-support": "^1.1.0",
"coveralls": "^3.0.3",
"diff": "^4.0.1",
@@ -29,7 +29,7 @@
"foreground-child": "^1.3.3",
"fs-exists-cached": "^1.0.0",
"function-loop": "^1.0.2",
- "glob": "^7.1.3",
+ "glob": "^7.1.4",
"import-jsx": "^2.0.0",
"isexe": "^2.0.0",
"istanbul-lib-processinfo": "^1.0.0",
@@ -51,10 +51,10 @@
"treport": "^0.3.0",
"trivial-deferred": "^1.0.1",
"ts-node": "^8.1.0",
- "typescript": "^3.4.3",
+ "typescript": "^3.4.5",
"which": "^1.3.1",
"write-file-atomic": "^2.4.2",
- "yaml": "^1.5.0",
+ "yaml": "^1.5.1",
"yapool": "^1.0.0"
},
"keywords": [