Skip to content
Permalink
Browse files
Fix failing tests in Chromium
Use full sinon instances when comparing the instance to other value
  • Loading branch information
mroderick committed Jan 8, 2018
1 parent 9bf4936 commit ea666c0e998e82465d33f37c4a67a995bcb39acc
Showing 1 changed file with 10 additions and 0 deletions.
@@ -39,6 +39,11 @@ describe("sinon module", function () {

describe("deprecated methods", function () {
it(".sandbox.create", function () {
// use full sinon for this test as it compares sinon instance
// proxyquire changes the instance, so `actual instanceof Sandbox` returns `false`
// see https://github.com/sinonjs/sinon/pull/1586#issuecomment-354457231
sinon = require("../lib/sinon");

// eslint-disable-next-line max-len
var expectedMessage = "`sandbox.create()` is deprecated. Use default sandbox at `sinon.sandbox` or create new sandboxes with `sinon.createSandbox()`";
var infoStub = sinon.stub(console, "info");
@@ -55,6 +60,11 @@ describe("sinon module", function () {
describe("exports", function () {
describe("default sandbox", function () {
it("should be an instance of Sandbox", function () {
// use full sinon for this test as it compares sinon instance
// proxyquire changes the instance, so `actual instanceof Sandbox` returns `false`
// see https://github.com/sinonjs/sinon/pull/1586#issuecomment-354457231
sinon = require("../lib/sinon");

assert.hasPrototype(sinon, Sandbox.prototype);
});
});

0 comments on commit ea666c0

Please sign in to comment.