mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* Ignore * Create biome.json * Ignore * biome * [autofix.ci] apply automated fixes --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
18 lines
562 B
JavaScript
18 lines
562 B
JavaScript
var assert = require("assert");
|
|
|
|
test("doesNotMatch does not throw when not matching", () => {
|
|
assert.doesNotMatch("I will pass", /different/);
|
|
});
|
|
|
|
test("doesNotMatch throws when argument is not string", () => {
|
|
expect(() => assert.doesNotMatch(123, /pass/)).toThrow(
|
|
'The "actual" argument must be of type string. Received type number',
|
|
);
|
|
});
|
|
|
|
test("doesNotMatch throws when matching", () => {
|
|
expect(() => assert.doesNotMatch("I will fail", /fail/, "doesNotMatch throws when matching")).toThrow(
|
|
"doesNotMatch throws when matching",
|
|
);
|
|
});
|