Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sinon match with referee #249

Merged
merged 3 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/match.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

var assert = require("assert");
var sinon = require("sinon");
var samsam = require("@sinonjs/samsam");
var referee = require("./referee");
var anonymousFunction = require("./test-helper/anonymous-function-string");
Expand Down Expand Up @@ -43,6 +44,15 @@ describe("match", function () {
}
);
});

it("should pass sinon.match.string in object", function () {
var object = { foo: 1, bar: "test" };

referee.assert.equals(object, {
foo: 1,
bar: sinon.match.string,
});
});
});

context("with refute.equals", function () {
Expand Down
81 changes: 57 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@sinonjs/commons": "^2.0.0",
"@sinonjs/samsam": "^7.0.1",
"@sinonjs/samsam": "^8.0.0",
"event-emitter": "^0.3.5",
"lodash.isarguments": "^3.1.0",
"util": "^0.12.5"
Expand Down Expand Up @@ -66,6 +66,6 @@
"nyc": "^15.1.0",
"prettier": "^2.8.3",
"proxyquire": "^2.1.3",
"sinon": "^15.0.1"
"sinon": "^15.0.3"
}
}