hamjest
Version:
A library of composable matchers for defining meaningful and readable assertions in JavaScript.
22 lines (17 loc) • 480 B
JavaScript
;
const _create = require('lodash/create');
const Matcher = require('./Matcher');
function IsSame(expectedValue) {
return _create(new Matcher(), {
matches: function (actualValue) {
return expectedValue === actualValue;
},
describeTo: function (description) {
description.append('same instance (').appendValue(expectedValue).append(')');
}
});
}
IsSame.strictlyEqualTo = function (operand) {
return new IsSame(operand);
};
module.exports = IsSame;