Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setUp: function() {
sinon.spy(referee, "fail");
testHelper.okListener = sinon.spy();
referee.on("pass", testHelper.okListener);
testHelper.failListener = sinon.spy();
referee.on("failure", testHelper.failListener);
sinon.replace(commons.deprecated, "wrap", function(f) {
return f;
});
},
"use strict";
var actualAndTypeOfMessageValues = require("../actual-and-type-of-message-values");
var deprecated = require("@sinonjs/commons").deprecated;
module.exports = function(referee) {
function definedAssert(actual) {
return typeof actual !== "undefined";
}
referee.add("defined", {
assert: function(actual) {
return deprecated.wrap(
definedAssert,
"defined is deprecated and will be removed in the future. Please use isUndefined instead."
)(actual);
},
assertMessage: "${customMessage}Expected to be defined",
refuteMessage:
"${customMessage}Expected ${actual} (${actualType}) not to be defined",
expectation: "toBeDefined",
"use strict";
var behavior = require("./sinon/behavior");
var createSandbox = require("./sinon/create-sandbox");
var deprecated = require("@sinonjs/commons").deprecated;
var extend = require("./sinon/util/core/extend");
var fakeTimers = require("./sinon/util/fake-timers");
var format = require("./sinon/util/core/format");
var nise = require("nise");
var Sandbox = require("./sinon/sandbox");
var stub = require("./sinon/stub");
var apiMethods = {
createSandbox: createSandbox,
assert: require("./sinon/assert"),
match: require("@sinonjs/samsam").createMatcher,
restoreObject: require("./sinon/restore-object"),
spyCall: require("./sinon/proxy-call"),
expectation: require("./sinon/mock-expectation"),
defaultConfig: require("./sinon/util/core/default-config"),