diff --git a/package-lock.json b/package-lock.json index 93b07d4..5635e4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2256,9 +2256,9 @@ "optional": true }, "dependency-check": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/dependency-check/-/dependency-check-2.9.2.tgz", - "integrity": "sha1-U3aI20osUpxJ8YPMKY+00X0e9DM=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/dependency-check/-/dependency-check-2.10.0.tgz", + "integrity": "sha1-PPhmKQ79KEtHGv6AwJhh7m94020=", "dev": true, "requires": { "async": "2.6.0", @@ -3909,11 +3909,6 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, - "get-own-enumerable-property-symbols": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", - "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==" - }, "get-port": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", @@ -4546,7 +4541,8 @@ "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true }, "is-object": { "version": "1.0.1", @@ -4617,11 +4613,6 @@ "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" - }, "is-relative": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", @@ -8449,16 +8440,6 @@ "safe-buffer": "5.1.1" } }, - "stringify-object": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.1.tgz", - "integrity": "sha512-jPcQYw/52HUPP8uOE4kkjxl5bB9LfHkKCTptIk3qw7ozP5XMIMlHMLjt00GGSwW6DJAf/njY5EU6Vpwl4LlBKQ==", - "requires": { - "get-own-enumerable-property-symbols": "2.0.1", - "is-obj": "1.0.1", - "is-regexp": "1.0.0" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -8557,11 +8538,10 @@ } }, "tersify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tersify/-/tersify-1.1.0.tgz", - "integrity": "sha512-7FAAwDPBgDXyzujAgPmVtq3z6gwhRNcvZYoFhtgbMwyu4aBjZLGAFMIaHhSFOC54v8YNFRoGIeInYXMPfQ282Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tersify/-/tersify-1.1.1.tgz", + "integrity": "sha512-Z4unFbd9oeCax/TpN2NmNC/6+j7nM8CoE0/P3NY7p9jwYphAbWz55fl3aZG6EA7Cw7yhELnFF8AJYLoMNJzw+A==", "requires": { - "stringify-object": "3.2.1", "unpartial": "0.4.1" } }, @@ -8800,22 +8780,31 @@ "dev": true }, "tslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", - "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "dev": true, "requires": { "babel-code-frame": "6.26.0", "builtin-modules": "1.1.1", "chalk": "2.3.0", - "commander": "2.11.0", + "commander": "2.13.0", "diff": "3.4.0", "glob": "7.1.2", + "js-yaml": "3.10.0", "minimatch": "3.0.4", "resolve": "1.5.0", "semver": "5.4.1", "tslib": "1.8.0", - "tsutils": "2.12.1" + "tsutils": "2.16.0" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + } } }, "tslint-config-standard": { @@ -8879,12 +8868,20 @@ } }, "tsutils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.1.tgz", - "integrity": "sha1-9Nlc4zkciXHkblTEzw7bCiHdWyQ=", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", + "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", "dev": true, "requires": { - "tslib": "1.8.0" + "tslib": "1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", + "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=", + "dev": true + } } }, "tunnel-agent": { diff --git a/package.json b/package.json index c77e134..d192ab1 100644 --- a/package.json +++ b/package.json @@ -61,18 +61,18 @@ "devDependencies": { "@types/node": "^8.5.8", "ava": "^0.24.0", - "dependency-check": "^2.9.2", + "dependency-check": "^2.10.0", "eslint": "^4.15.0", "eslint-config-unional": "^0.2.3", "nyc": "^11.4.1", "rimraf": "^2.6.2", "semantic-release": "^11.2.0", "travis-deploy-once": "^4.3.0", - "tslint": "^5.8.0", + "tslint": "^5.9.1", "tslint-config-unional": "^0.9.0", "typescript": "^2.6.2" }, "dependencies": { - "tersify": "^1.1.0" + "tersify": "^1.1.1" } } diff --git a/src/spy.spec.ts b/src/spy.spec.ts index 3f24e29..52acc3a 100644 --- a/src/spy.spec.ts +++ b/src/spy.spec.ts @@ -20,7 +20,7 @@ test('tersify for sync call', async t => { t.is(fn(1), 2) const record = await calls[0].getCallRecord() - t.is(record.tersify(), `{ inputs: [1], output: 2, error: undefined }`) + t.is(record.tersify(), `{ inputs: [1], output: 2 }`) }) function throws() { throw new Error('thrown') } @@ -40,7 +40,7 @@ test('tersify for throws call', async t => { t.throws(fn) const record = await calls[0].getCallRecord() - t.is(record.tersify(), `{ inputs: [], output: undefined, error: { message: 'thrown' } }`) + t.is(record.tersify(), `{ inputs: [], error: { message: 'thrown' } }`) }) // this is not a valid test as the package is used for boundary testing. @@ -69,7 +69,7 @@ test('tersify for callback', async t => { fn(1, x => t.is(x, 1)) const record = await calls[0].getCallRecord() - t.is(record.tersify(), `{ inputs: [1, callback], output: undefined, error: undefined, asyncOutput: [1] }`) + t.is(record.tersify(), `{ inputs: [1, callback], asyncOutput: [1] }`) }) function callbackLiteral(options) { @@ -97,9 +97,8 @@ test('tersify for callback', async t => { t.is(result, 2) } }) - const record = await calls[0].getCallRecord() - t.is(record.tersify(), `{ inputs: [{ data: 1, success: callback }], output: undefined, error: undefined, asyncOutput: [2] }`) + t.is(record.tersify(), `{ inputs: [{ data: 1, success: callback }], asyncOutput: [2] }`) }) const resolve = x => Promise.resolve(x) @@ -138,7 +137,7 @@ test('tersify for resolve call', async t => { fn(1) return calls[0].getCallRecord() .then(record => { - t.is(record.tersify(), `{ inputs: [1], output: {}, error: undefined, asyncOutput: 1 }`) + t.is(record.tersify(), `{ inputs: [1], output: {}, asyncOutput: 1 }`) }) }) @@ -148,7 +147,7 @@ test('tersify for reject call', async t => { return fn(1).catch(() => { return calls[0].getCallRecord() .then(record => { - t.is(record.tersify(), `{ inputs: [1], output: {}, error: undefined, asyncError: { message: '1' } }`) + t.is(record.tersify(), `{ inputs: [1], output: {}, asyncError: { message: '1' } }`) }) }) })