diff --git a/package-lock.json b/package-lock.json index 9f63d8870..4cdf762b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -293,12 +293,12 @@ } }, "@sinonjs/referee": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/referee/-/referee-3.1.1.tgz", - "integrity": "sha512-mm2ufJKEc5RRNSN5Tu+c3NvfwSl2S+orefe9+ZZm/A1KQd3JWuWvEUrQ6isV1OhcZhIFYK8+JskJn+JH73vaLw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/referee/-/referee-3.2.0.tgz", + "integrity": "sha512-t+sDpTvUmqgYWkPwTuO4gEivScbEKbF6eqFB9Cv70PqcyJla3w7Mj0JQyXn18uCDR2bIZglD4NNGeWGg8YfaGw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.3.0", + "@sinonjs/commons": "^1.4.0", "@sinonjs/formatio": "^3.1.0", "@sinonjs/samsam": "^3.0.0", "array-from": "2.1.1", diff --git a/package.json b/package.json index c90b51071..98f09fd95 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@babel/core": "^7.3.3", - "@sinonjs/referee": "^3.1.1", + "@sinonjs/referee": "^3.2.0", "babel-plugin-istanbul": "^5.1.1", "babelify": "^10.0.0", "browserify": "^16.2.3", diff --git a/test/call-test.js b/test/call-test.js index 42d1bde89..7be5b47e5 100644 --- a/test/call-test.js +++ b/test/call-test.js @@ -1215,7 +1215,7 @@ describe("sinonSpy.call", function() { sinonSpy(myObj, "ouch"); }); - refute.defined(myObj.ouch); + assert.isUndefined(myObj.ouch); }); it("throws if spying on non-existent object", function() { diff --git a/test/fake-test.js b/test/fake-test.js index c77edff52..4dffac4ad 100644 --- a/test/fake-test.js +++ b/test/fake-test.js @@ -156,7 +156,7 @@ describe("fake", function() { assert.equals(f.lastArg, false); f(); - refute.defined(f.lastArg); + assert.isUndefined(f.lastArg); }); }); diff --git a/test/sandbox-test.js b/test/sandbox-test.js index 315e713f3..e8716521b 100644 --- a/test/sandbox-test.js +++ b/test/sandbox-test.js @@ -1832,10 +1832,10 @@ describe("Sandbox", function() { assert.equals(sandbox.args.length, 0); assert.equals(object.server, this.fakeServer); assert.clock(object.clock); - refute.defined(object.spy); - refute.defined(object.stub); - refute.defined(object.mock); - refute.defined(object.requests); + assert.isUndefined(object.spy); + assert.isUndefined(object.stub); + assert.isUndefined(object.mock); + assert.isUndefined(object.requests); sandbox.restore(); }); @@ -1858,7 +1858,7 @@ describe("Sandbox", function() { assert.isFunction(object.stub); assert.isFunction(object.mock); assert.isArray(object.requests); - refute.defined(object.sandbox); + assert.isUndefined(object.sandbox); sandbox.restore(); }); diff --git a/test/spy-test.js b/test/spy-test.js index 8eebc278d..488a3a133 100644 --- a/test/spy-test.js +++ b/test/spy-test.js @@ -255,7 +255,7 @@ describe("spy", function() { it("does not define create method", function() { var spy = createSpy.create(); - refute.defined(spy.create); + assert.isUndefined(spy.create); }); it("does not overwrite original create property", function() { @@ -351,15 +351,15 @@ describe("spy", function() { assert.equals(spy.withArgs(1, 2).callCount, 1); // assert call - refute.defined(spy.getCall(0).args[0]); + assert.isUndefined(spy.getCall(0).args[0]); assert.equals(spy.getCall(1).args[0], 1); - refute.defined(spy.getCall(1).args[1]); + assert.isUndefined(spy.getCall(1).args[1]); assert.equals(spy.getCall(2).args[0], 1); assert.equals(spy.getCall(2).args[1], 1); - refute.defined(spy.getCall(2).args[2]); + assert.isUndefined(spy.getCall(2).args[2]); assert.equals(spy.getCall(3).args[0], 1); assert.equals(spy.getCall(3).args[1], 2); - refute.defined(spy.getCall(3).args[2]); + assert.isUndefined(spy.getCall(3).args[2]); ["args", "callCount", "callId"].forEach(function(propName) { assert.equals(spy.withArgs(1).getCall(0)[propName], spy.getCall(1)[propName]); assert.equals(spy.withArgs(1).getCall(1)[propName], spy.getCall(2)[propName]); @@ -1531,7 +1531,7 @@ describe("spy", function() { this.spy(); assert.equals(this.spy.exceptions.length, 1); - refute.defined(this.spy.exceptions[0]); + assert.isUndefined(this.spy.exceptions[0]); }); it("stacks up exceptions and undefined", function() { @@ -1557,11 +1557,11 @@ describe("spy", function() { spy(); assert.equals(spy.exceptions.length, 5); - refute.defined(spy.exceptions[0]); + assert.isUndefined(spy.exceptions[0]); assert.equals(spy.exceptions[1], err); - refute.defined(spy.exceptions[2]); + assert.isUndefined(spy.exceptions[2]); assert.equals(spy.exceptions[3], err); - refute.defined(spy.exceptions[4]); + assert.isUndefined(spy.exceptions[4]); }); }); @@ -1665,7 +1665,7 @@ describe("spy", function() { spy(); assert.equals(spy.returnValues.length, 1); - refute.defined(spy.returnValues[0]); + assert.isUndefined(spy.returnValues[0]); }); it("contains return value", function() { @@ -1688,7 +1688,7 @@ describe("spy", function() { assert.exception(spy); assert.equals(spy.returnValues.length, 1); - refute.defined(spy.returnValues[0]); + assert.isUndefined(spy.returnValues[0]); }); it("contains the created object for spied constructors", function() { @@ -1742,11 +1742,11 @@ describe("spy", function() { spy(); assert.equals(spy.returnValues.length, 5); - refute.defined(spy.returnValues[0]); + assert.isUndefined(spy.returnValues[0]); assert.equals(spy.returnValues[1], 2); - refute.defined(spy.returnValues[2]); + assert.isUndefined(spy.returnValues[2]); assert.equals(spy.returnValues[3], 4); - refute.defined(spy.returnValues[4]); + assert.isUndefined(spy.returnValues[4]); }); }); diff --git a/test/stub-test.js b/test/stub-test.js index 729037e47..7188e95fa 100644 --- a/test/stub-test.js +++ b/test/stub-test.js @@ -128,7 +128,7 @@ describe("stub", function() { it("returns undefined", function() { var stub = createStub.create(); - refute.defined(stub()); + assert.isUndefined(stub()); }); it("supersedes previous throws", function() { @@ -794,7 +794,7 @@ describe("stub", function() { assert.exception(stub); - refute.defined(stub.invoking); + assert.isUndefined(stub.invoking); }); }); @@ -1441,7 +1441,7 @@ describe("stub", function() { createStub(myObj, "ouch"); }); - refute.defined(myObj.ouch); + assert.isUndefined(myObj.ouch); }); }); @@ -2504,7 +2504,7 @@ describe("stub", function() { assert.same(stub(5), 1); assert.same(stub(5), 2); - refute.defined(stub(5)); + assert.isUndefined(stub(5)); }); it("does not create undefined behaviour just by calling onCall", function() { @@ -2525,13 +2525,13 @@ describe("stub", function() { assert.same(stub(5), 1); assert.same(stub(5), 2); - refute.defined(stub(5)); + assert.isUndefined(stub(5)); stub.reset(); assert.same(stub(5), undefined); assert.same(stub(5), undefined); - refute.defined(stub(5)); + assert.isUndefined(stub(5)); }); it("throws an understandable error when trying to use withArgs on behavior", function() { @@ -2777,7 +2777,7 @@ describe("stub", function() { stub.resetBehavior(); - refute.defined(stub()); + assert.isUndefined(stub()); }); it("cleans behavior of fakes returned by withArgs", function() { @@ -2786,7 +2786,7 @@ describe("stub", function() { stub.resetBehavior(); - refute.defined(stub("lolz")); + assert.isUndefined(stub("lolz")); }); it("does not clean parents' behavior when called on a fake returned by withArgs", function() { @@ -2804,7 +2804,7 @@ describe("stub", function() { stub.resetBehavior(); - refute.defined(stub("defined")); + assert.isUndefined(stub("defined")); }); it("cleans 'returnsThis' behavior", function() { @@ -2814,7 +2814,7 @@ describe("stub", function() { instance.stub.resetBehavior(); - refute.defined(instance.stub()); + assert.isUndefined(instance.stub()); }); it("cleans 'resolvesThis' behavior, so the stub does not resolve nor returns anything", function() { @@ -2824,7 +2824,7 @@ describe("stub", function() { instance.stub.resetBehavior(); - refute.defined(instance.stub()); + assert.isUndefined(instance.stub()); }); describe("does not touch properties that are reset by 'reset'", function() { @@ -2850,10 +2850,10 @@ describe("stub", function() { assert.equals(stub.returnValues.length, 3); assert.equals(stub.exceptions.length, 3); assert.equals(stub.thisValues.length, 3); - assert.defined(stub.firstCall); - assert.defined(stub.secondCall); - assert.defined(stub.thirdCall); - assert.defined(stub.lastCall); + refute.isUndefined(stub.firstCall); + refute.isUndefined(stub.secondCall); + refute.isUndefined(stub.thirdCall); + refute.isUndefined(stub.lastCall); }); it("call order state", function() { diff --git a/test/util/fake-timers-test.js b/test/util/fake-timers-test.js index 8fddfe1e6..979656471 100644 --- a/test/util/fake-timers-test.js +++ b/test/util/fake-timers-test.js @@ -792,7 +792,7 @@ describe("fakeTimers.clock", function() { } else { describe("unsupported now", function() { it("is undefined", function() { - refute.defined(this.clock.Date.now); + assert.isUndefined(this.clock.Date.now); }); }); } @@ -818,7 +818,7 @@ describe("fakeTimers.clock", function() { } else { describe("unsupported toSource", function() { it("is undefined", function() { - refute.defined(this.clock.Date.toSource); + assert.isUndefined(this.clock.Date.toSource); }); }); } @@ -1047,7 +1047,7 @@ describe("fakeTimers.clock", function() { this.global.Date.now = null; this.clock = fakeTimers.useFakeTimers(0); - refute.defined(Date.now); + assert.isUndefined(Date.now); }); it("mirrors custom Date properties", function() { @@ -1192,7 +1192,7 @@ describe("fakeTimers.clock", function() { clearTimeout: sinonStub.create() }; this.clock = fakeTimers.useFakeTimers({ global: globalCtx }); - refute.defined(this.clock.performance); + assert.isUndefined(this.clock.performance); assert.same(this.clock._setTimeout, stub); // eslint-disable-line no-underscore-dangle this.clock.restore(); });