How to use the @sinonjs/samsam.createMatcher function in @sinonjs/samsam

To help you get started, we’ve selected a few @sinonjs/samsam examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sinonjs / sinon / lib / sinon / assert.js View on Github external
match: function match(actual, expectation) {
        var matcher = createMatcher(expectation);
        if (matcher.test(actual)) {
            assert.pass("match");
        } else {
            var formatted = [
                "expected value to match",
                "    expected = " + format(expectation),
                "    actual = " + format(actual)
            ];

            failAssertion(this, join(formatted, "\n"));
        }
    }
};
github sinonjs / sinon / lib / sinon / proxy-call.js View on Github external
function(prev, expectation, i) {
                var actual = self.args[i];

                return prev && match(expectation).test(actual);
            },
            true

@sinonjs/samsam

Value identification and comparison functions

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

85 / 100
Full package analysis

Similar packages