@temboplus/afloat 0.1.60 → 0.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -3
- package/esm/_dnt.test_shims.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/esm/src/models/contact/validation.test.d.ts.map +0 -1
- package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/npm/src/_dnt.test_shims.d.ts +0 -6
- package/script/npm/src/_dnt.test_shims.d.ts.map +0 -1
- package/script/npm/src/_dnt.test_shims.js +0 -65
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +0 -26
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +0 -34
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +0 -17
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +0 -209
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +0 -30
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +0 -55
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +0 -19
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +0 -31
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +0 -44
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +0 -21
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +0 -36
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +0 -163
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +0 -42
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +0 -60
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +0 -45
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +0 -47
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.js +0 -64
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +0 -331
- package/script/npm/src/src/models/contact/validation.test.d.ts +0 -2
- package/script/npm/src/src/models/contact/validation.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/validation.test.js +0 -186
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.js +0 -76
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `error` is an `Error`.
|
|
3
|
-
* If not then an error will be thrown.
|
|
4
|
-
* An error class and a string that should be included in the
|
|
5
|
-
* error message can also be asserted.
|
|
6
|
-
*
|
|
7
|
-
* @example Usage
|
|
8
|
-
* ```ts ignore
|
|
9
|
-
* import { assertIsError } from "@std/assert";
|
|
10
|
-
*
|
|
11
|
-
* assertIsError(null); // Throws
|
|
12
|
-
* assertIsError(new RangeError("Out of range")); // Doesn't throw
|
|
13
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError); // Throws
|
|
14
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Out of range"); // Doesn't throw
|
|
15
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Within range"); // Throws
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @typeParam E The type of the error to assert.
|
|
19
|
-
* @param error The error to assert.
|
|
20
|
-
* @param ErrorClass The optional error class to assert.
|
|
21
|
-
* @param msgMatches The optional string or RegExp to assert in the error message.
|
|
22
|
-
* @param msg The optional message to display if the assertion fails.
|
|
23
|
-
*/
|
|
24
|
-
export declare function assertIsError<E extends Error = Error>(error: unknown, ErrorClass?: abstract new (...args: any[]) => E, msgMatches?: string | RegExp, msg?: string): asserts error is E;
|
|
25
|
-
//# sourceMappingURL=is_error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertIsError = assertIsError;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
const styles_js_1 = require("../../internal/1.0.5/styles.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `error` is an `Error`.
|
|
10
|
-
* If not then an error will be thrown.
|
|
11
|
-
* An error class and a string that should be included in the
|
|
12
|
-
* error message can also be asserted.
|
|
13
|
-
*
|
|
14
|
-
* @example Usage
|
|
15
|
-
* ```ts ignore
|
|
16
|
-
* import { assertIsError } from "@std/assert";
|
|
17
|
-
*
|
|
18
|
-
* assertIsError(null); // Throws
|
|
19
|
-
* assertIsError(new RangeError("Out of range")); // Doesn't throw
|
|
20
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError); // Throws
|
|
21
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Out of range"); // Doesn't throw
|
|
22
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Within range"); // Throws
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @typeParam E The type of the error to assert.
|
|
26
|
-
* @param error The error to assert.
|
|
27
|
-
* @param ErrorClass The optional error class to assert.
|
|
28
|
-
* @param msgMatches The optional string or RegExp to assert in the error message.
|
|
29
|
-
* @param msg The optional message to display if the assertion fails.
|
|
30
|
-
*/
|
|
31
|
-
function assertIsError(error,
|
|
32
|
-
// deno-lint-ignore no-explicit-any
|
|
33
|
-
ErrorClass, msgMatches, msg) {
|
|
34
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
35
|
-
if (!(error instanceof Error)) {
|
|
36
|
-
throw new assertion_error_js_1.AssertionError(`Expected "error" to be an Error object${msgSuffix}`);
|
|
37
|
-
}
|
|
38
|
-
if (ErrorClass && !(error instanceof ErrorClass)) {
|
|
39
|
-
msg =
|
|
40
|
-
`Expected error to be instance of "${ErrorClass.name}", but was "${error?.constructor?.name}"${msgSuffix}`;
|
|
41
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
42
|
-
}
|
|
43
|
-
let msgCheck;
|
|
44
|
-
if (typeof msgMatches === "string") {
|
|
45
|
-
msgCheck = (0, styles_js_1.stripAnsiCode)(error.message).includes((0, styles_js_1.stripAnsiCode)(msgMatches));
|
|
46
|
-
}
|
|
47
|
-
if (msgMatches instanceof RegExp) {
|
|
48
|
-
msgCheck = msgMatches.test((0, styles_js_1.stripAnsiCode)(error.message));
|
|
49
|
-
}
|
|
50
|
-
if (msgMatches && !msgCheck) {
|
|
51
|
-
msg = `Expected error message to include ${msgMatches instanceof RegExp
|
|
52
|
-
? msgMatches.toString()
|
|
53
|
-
: JSON.stringify(msgMatches)}, but got ${JSON.stringify(error?.message)}${msgSuffix}`;
|
|
54
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` is less than `expected`.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertLess } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertLess(1, 2); // Doesn't throw
|
|
10
|
-
* assertLess(2, 1); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @typeParam T The type of the values to compare.
|
|
14
|
-
* @param actual The actual value to compare.
|
|
15
|
-
* @param expected The expected value to compare.
|
|
16
|
-
* @param msg The optional message to display if the assertion fails.
|
|
17
|
-
*/
|
|
18
|
-
export declare function assertLess<T>(actual: T, expected: T, msg?: string): void;
|
|
19
|
-
//# sourceMappingURL=less.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/less.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMjE"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertLess = assertLess;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
7
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `actual` is less than `expected`.
|
|
10
|
-
* If not then throw.
|
|
11
|
-
*
|
|
12
|
-
* @example Usage
|
|
13
|
-
* ```ts ignore
|
|
14
|
-
* import { assertLess } from "@std/assert";
|
|
15
|
-
*
|
|
16
|
-
* assertLess(1, 2); // Doesn't throw
|
|
17
|
-
* assertLess(2, 1); // Throws
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @typeParam T The type of the values to compare.
|
|
21
|
-
* @param actual The actual value to compare.
|
|
22
|
-
* @param expected The expected value to compare.
|
|
23
|
-
* @param msg The optional message to display if the assertion fails.
|
|
24
|
-
*/
|
|
25
|
-
function assertLess(actual, expected, msg) {
|
|
26
|
-
if (actual < expected)
|
|
27
|
-
return;
|
|
28
|
-
const actualString = (0, format_js_1.format)(actual);
|
|
29
|
-
const expectedString = (0, format_js_1.format)(expected);
|
|
30
|
-
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
|
|
31
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` is less than or equal to `expected`.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertLessOrEqual } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertLessOrEqual(1, 2); // Doesn't throw
|
|
10
|
-
* assertLessOrEqual(1, 1); // Doesn't throw
|
|
11
|
-
* assertLessOrEqual(1, 0); // Throws
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @typeParam T The type of the values to compare.
|
|
15
|
-
* @param actual The actual value to compare.
|
|
16
|
-
* @param expected The expected value to compare.
|
|
17
|
-
* @param msg The optional message to display if the assertion fails.
|
|
18
|
-
*/
|
|
19
|
-
export declare function assertLessOrEqual<T>(actual: T, expected: T, msg?: string): void;
|
|
20
|
-
//# sourceMappingURL=less_or_equal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertLessOrEqual = assertLessOrEqual;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
7
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `actual` is less than or equal to `expected`.
|
|
10
|
-
* If not then throw.
|
|
11
|
-
*
|
|
12
|
-
* @example Usage
|
|
13
|
-
* ```ts ignore
|
|
14
|
-
* import { assertLessOrEqual } from "@std/assert";
|
|
15
|
-
*
|
|
16
|
-
* assertLessOrEqual(1, 2); // Doesn't throw
|
|
17
|
-
* assertLessOrEqual(1, 1); // Doesn't throw
|
|
18
|
-
* assertLessOrEqual(1, 0); // Throws
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @typeParam T The type of the values to compare.
|
|
22
|
-
* @param actual The actual value to compare.
|
|
23
|
-
* @param expected The expected value to compare.
|
|
24
|
-
* @param msg The optional message to display if the assertion fails.
|
|
25
|
-
*/
|
|
26
|
-
function assertLessOrEqual(actual, expected, msg) {
|
|
27
|
-
if (actual <= expected)
|
|
28
|
-
return;
|
|
29
|
-
const actualString = (0, format_js_1.format)(actual);
|
|
30
|
-
const expectedString = (0, format_js_1.format)(expected);
|
|
31
|
-
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` match RegExp `expected`. If not
|
|
3
|
-
* then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertMatch } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertMatch("Raptor", /Raptor/); // Doesn't throw
|
|
10
|
-
* assertMatch("Denosaurus", /Raptor/); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param actual The actual value to be matched.
|
|
14
|
-
* @param expected The expected pattern to match.
|
|
15
|
-
* @param msg The optional message to display if the assertion fails.
|
|
16
|
-
*/
|
|
17
|
-
export declare function assertMatch(actual: string, expected: RegExp, msg?: string): void;
|
|
18
|
-
//# sourceMappingURL=match.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertMatch = assertMatch;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `actual` match RegExp `expected`. If not
|
|
9
|
-
* then throw.
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { assertMatch } from "@std/assert";
|
|
14
|
-
*
|
|
15
|
-
* assertMatch("Raptor", /Raptor/); // Doesn't throw
|
|
16
|
-
* assertMatch("Denosaurus", /Raptor/); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @param actual The actual value to be matched.
|
|
20
|
-
* @param expected The expected pattern to match.
|
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
|
22
|
-
*/
|
|
23
|
-
function assertMatch(actual, expected, msg) {
|
|
24
|
-
if (expected.test(actual))
|
|
25
|
-
return;
|
|
26
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
27
|
-
msg = `Expected actual: "${actual}" to match: "${expected}"${msgSuffix}`;
|
|
28
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/** A library of assertion functions.
|
|
2
|
-
* If the assertion is false an `AssertionError` will be thrown which will
|
|
3
|
-
* result in pretty-printed diff of the failing assertion.
|
|
4
|
-
*
|
|
5
|
-
* This module is browser compatible, but do not rely on good formatting of
|
|
6
|
-
* values for AssertionError messages in browsers.
|
|
7
|
-
*
|
|
8
|
-
* ```ts ignore
|
|
9
|
-
* import { assert } from "@std/assert";
|
|
10
|
-
*
|
|
11
|
-
* assert("I am truthy"); // Doesn't throw
|
|
12
|
-
* assert(false); // Throws `AssertionError`
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* @module
|
|
16
|
-
*/
|
|
17
|
-
export * from "./almost_equals.js";
|
|
18
|
-
export * from "./array_includes.js";
|
|
19
|
-
export * from "./equals.js";
|
|
20
|
-
export * from "./exists.js";
|
|
21
|
-
export * from "./false.js";
|
|
22
|
-
export * from "./greater_or_equal.js";
|
|
23
|
-
export * from "./greater.js";
|
|
24
|
-
export * from "./instance_of.js";
|
|
25
|
-
export * from "./is_error.js";
|
|
26
|
-
export * from "./less_or_equal.js";
|
|
27
|
-
export * from "./less.js";
|
|
28
|
-
export * from "./match.js";
|
|
29
|
-
export * from "./not_equals.js";
|
|
30
|
-
export * from "./not_instance_of.js";
|
|
31
|
-
export * from "./not_match.js";
|
|
32
|
-
export * from "./not_strict_equals.js";
|
|
33
|
-
export * from "./object_match.js";
|
|
34
|
-
export * from "./rejects.js";
|
|
35
|
-
export * from "./strict_equals.js";
|
|
36
|
-
export * from "./string_includes.js";
|
|
37
|
-
export * from "./throws.js";
|
|
38
|
-
export * from "./assert.js";
|
|
39
|
-
export * from "./assertion_error.js";
|
|
40
|
-
export * from "./equal.js";
|
|
41
|
-
export * from "./fail.js";
|
|
42
|
-
export * from "./unimplemented.js";
|
|
43
|
-
export * from "./unreachable.js";
|
|
44
|
-
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
/** A library of assertion functions.
|
|
20
|
-
* If the assertion is false an `AssertionError` will be thrown which will
|
|
21
|
-
* result in pretty-printed diff of the failing assertion.
|
|
22
|
-
*
|
|
23
|
-
* This module is browser compatible, but do not rely on good formatting of
|
|
24
|
-
* values for AssertionError messages in browsers.
|
|
25
|
-
*
|
|
26
|
-
* ```ts ignore
|
|
27
|
-
* import { assert } from "@std/assert";
|
|
28
|
-
*
|
|
29
|
-
* assert("I am truthy"); // Doesn't throw
|
|
30
|
-
* assert(false); // Throws `AssertionError`
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @module
|
|
34
|
-
*/
|
|
35
|
-
__exportStar(require("./almost_equals.js"), exports);
|
|
36
|
-
__exportStar(require("./array_includes.js"), exports);
|
|
37
|
-
__exportStar(require("./equals.js"), exports);
|
|
38
|
-
__exportStar(require("./exists.js"), exports);
|
|
39
|
-
__exportStar(require("./false.js"), exports);
|
|
40
|
-
__exportStar(require("./greater_or_equal.js"), exports);
|
|
41
|
-
__exportStar(require("./greater.js"), exports);
|
|
42
|
-
__exportStar(require("./instance_of.js"), exports);
|
|
43
|
-
__exportStar(require("./is_error.js"), exports);
|
|
44
|
-
__exportStar(require("./less_or_equal.js"), exports);
|
|
45
|
-
__exportStar(require("./less.js"), exports);
|
|
46
|
-
__exportStar(require("./match.js"), exports);
|
|
47
|
-
__exportStar(require("./not_equals.js"), exports);
|
|
48
|
-
__exportStar(require("./not_instance_of.js"), exports);
|
|
49
|
-
__exportStar(require("./not_match.js"), exports);
|
|
50
|
-
__exportStar(require("./not_strict_equals.js"), exports);
|
|
51
|
-
__exportStar(require("./object_match.js"), exports);
|
|
52
|
-
__exportStar(require("./rejects.js"), exports);
|
|
53
|
-
__exportStar(require("./strict_equals.js"), exports);
|
|
54
|
-
__exportStar(require("./string_includes.js"), exports);
|
|
55
|
-
__exportStar(require("./throws.js"), exports);
|
|
56
|
-
__exportStar(require("./assert.js"), exports);
|
|
57
|
-
__exportStar(require("./assertion_error.js"), exports);
|
|
58
|
-
__exportStar(require("./equal.js"), exports);
|
|
59
|
-
__exportStar(require("./fail.js"), exports);
|
|
60
|
-
__exportStar(require("./unimplemented.js"), exports);
|
|
61
|
-
__exportStar(require("./unreachable.js"), exports);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` and `expected` are not equal, deeply.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* Type parameter can be specified to ensure values under comparison have the same type.
|
|
6
|
-
*
|
|
7
|
-
* @example Usage
|
|
8
|
-
* ```ts ignore
|
|
9
|
-
* import { assertNotEquals } from "@std/assert";
|
|
10
|
-
*
|
|
11
|
-
* assertNotEquals(1, 2); // Doesn't throw
|
|
12
|
-
* assertNotEquals(1, 1); // Throws
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* @typeParam T The type of the values to compare.
|
|
16
|
-
* @param actual The actual value to compare.
|
|
17
|
-
* @param expected The expected value to compare.
|
|
18
|
-
* @param msg The optional message to display if the assertion fails.
|
|
19
|
-
*/
|
|
20
|
-
export declare function assertNotEquals<T>(actual: T, expected: T, msg?: string): void;
|
|
21
|
-
//# sourceMappingURL=not_equals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertNotEquals = assertNotEquals;
|
|
6
|
-
const equal_js_1 = require("./equal.js");
|
|
7
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
|
-
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
9
|
-
/**
|
|
10
|
-
* Make an assertion that `actual` and `expected` are not equal, deeply.
|
|
11
|
-
* If not then throw.
|
|
12
|
-
*
|
|
13
|
-
* Type parameter can be specified to ensure values under comparison have the same type.
|
|
14
|
-
*
|
|
15
|
-
* @example Usage
|
|
16
|
-
* ```ts ignore
|
|
17
|
-
* import { assertNotEquals } from "@std/assert";
|
|
18
|
-
*
|
|
19
|
-
* assertNotEquals(1, 2); // Doesn't throw
|
|
20
|
-
* assertNotEquals(1, 1); // Throws
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @typeParam T The type of the values to compare.
|
|
24
|
-
* @param actual The actual value to compare.
|
|
25
|
-
* @param expected The expected value to compare.
|
|
26
|
-
* @param msg The optional message to display if the assertion fails.
|
|
27
|
-
*/
|
|
28
|
-
function assertNotEquals(actual, expected, msg) {
|
|
29
|
-
if (!(0, equal_js_1.equal)(actual, expected)) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const actualString = (0, format_js_1.format)(actual);
|
|
33
|
-
const expectedString = (0, format_js_1.format)(expected);
|
|
34
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
35
|
-
throw new assertion_error_js_1.AssertionError(`Expected actual: ${actualString} not to be: ${expectedString}${msgSuffix}`);
|
|
36
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `obj` is not an instance of `type`.
|
|
3
|
-
* If so, then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertNotInstanceOf } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertNotInstanceOf(new Date(), Number); // Doesn't throw
|
|
10
|
-
* assertNotInstanceOf(new Date(), Date); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @typeParam A The type of the object to check.
|
|
14
|
-
* @typeParam T The type of the class to check against.
|
|
15
|
-
* @param actual The object to check.
|
|
16
|
-
* @param unexpectedType The class constructor to check against.
|
|
17
|
-
* @param msg The optional message to display if the assertion fails.
|
|
18
|
-
*/
|
|
19
|
-
export declare function assertNotInstanceOf<A, T>(actual: A, unexpectedType: abstract new (...args: any[]) => T, msg?: string): asserts actual is Exclude<A, T>;
|
|
20
|
-
//# sourceMappingURL=not_instance_of.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotInstanceOf = assertNotInstanceOf;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const false_js_1 = require("./false.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `obj` is not an instance of `type`.
|
|
9
|
-
* If so, then throw.
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { assertNotInstanceOf } from "@std/assert";
|
|
14
|
-
*
|
|
15
|
-
* assertNotInstanceOf(new Date(), Number); // Doesn't throw
|
|
16
|
-
* assertNotInstanceOf(new Date(), Date); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @typeParam A The type of the object to check.
|
|
20
|
-
* @typeParam T The type of the class to check against.
|
|
21
|
-
* @param actual The object to check.
|
|
22
|
-
* @param unexpectedType The class constructor to check against.
|
|
23
|
-
* @param msg The optional message to display if the assertion fails.
|
|
24
|
-
*/
|
|
25
|
-
function assertNotInstanceOf(actual,
|
|
26
|
-
// deno-lint-ignore no-explicit-any
|
|
27
|
-
unexpectedType, msg) {
|
|
28
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
29
|
-
msg =
|
|
30
|
-
`Expected object to not be an instance of "${typeof unexpectedType}"${msgSuffix}`;
|
|
31
|
-
(0, false_js_1.assertFalse)(actual instanceof unexpectedType, msg);
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` not match RegExp `expected`. If match
|
|
3
|
-
* then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertNotMatch } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
|
|
10
|
-
* assertNotMatch("Raptor", /Raptor/); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param actual The actual value to match.
|
|
14
|
-
* @param expected The expected value to not match.
|
|
15
|
-
* @param msg The optional message to display if the assertion fails.
|
|
16
|
-
*/
|
|
17
|
-
export declare function assertNotMatch(actual: string, expected: RegExp, msg?: string): void;
|
|
18
|
-
//# sourceMappingURL=not_match.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotMatch = assertNotMatch;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `actual` not match RegExp `expected`. If match
|
|
9
|
-
* then throw.
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { assertNotMatch } from "@std/assert";
|
|
14
|
-
*
|
|
15
|
-
* assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
|
|
16
|
-
* assertNotMatch("Raptor", /Raptor/); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @param actual The actual value to match.
|
|
20
|
-
* @param expected The expected value to not match.
|
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
|
22
|
-
*/
|
|
23
|
-
function assertNotMatch(actual, expected, msg) {
|
|
24
|
-
if (!expected.test(actual))
|
|
25
|
-
return;
|
|
26
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
27
|
-
msg = `Expected actual: "${actual}" to not match: "${expected}"${msgSuffix}`;
|
|
28
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` and `expected` are not strictly equal, using
|
|
3
|
-
* {@linkcode Object.is} for equality comparison. If the values are strictly
|
|
4
|
-
* equal then throw.
|
|
5
|
-
*
|
|
6
|
-
* @example Usage
|
|
7
|
-
* ```ts ignore
|
|
8
|
-
* import { assertNotStrictEquals } from "@std/assert";
|
|
9
|
-
*
|
|
10
|
-
* assertNotStrictEquals(1, 1); // Throws
|
|
11
|
-
* assertNotStrictEquals(1, 2); // Doesn't throw
|
|
12
|
-
*
|
|
13
|
-
* assertNotStrictEquals(0, 0); // Throws
|
|
14
|
-
* assertNotStrictEquals(0, -0); // Doesn't throw
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @typeParam T The type of the values to compare.
|
|
18
|
-
* @param actual The actual value to compare.
|
|
19
|
-
* @param expected The expected value to compare.
|
|
20
|
-
* @param msg The optional message to display if the assertion fails.
|
|
21
|
-
*/
|
|
22
|
-
export declare function assertNotStrictEquals<T>(actual: T, expected: T, msg?: string): void;
|
|
23
|
-
//# sourceMappingURL=not_strict_equals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAYb"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotStrictEquals = assertNotStrictEquals;
|
|
4
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `actual` and `expected` are not strictly equal, using
|
|
10
|
-
* {@linkcode Object.is} for equality comparison. If the values are strictly
|
|
11
|
-
* equal then throw.
|
|
12
|
-
*
|
|
13
|
-
* @example Usage
|
|
14
|
-
* ```ts ignore
|
|
15
|
-
* import { assertNotStrictEquals } from "@std/assert";
|
|
16
|
-
*
|
|
17
|
-
* assertNotStrictEquals(1, 1); // Throws
|
|
18
|
-
* assertNotStrictEquals(1, 2); // Doesn't throw
|
|
19
|
-
*
|
|
20
|
-
* assertNotStrictEquals(0, 0); // Throws
|
|
21
|
-
* assertNotStrictEquals(0, -0); // Doesn't throw
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @typeParam T The type of the values to compare.
|
|
25
|
-
* @param actual The actual value to compare.
|
|
26
|
-
* @param expected The expected value to compare.
|
|
27
|
-
* @param msg The optional message to display if the assertion fails.
|
|
28
|
-
*/
|
|
29
|
-
function assertNotStrictEquals(actual, expected, msg) {
|
|
30
|
-
if (!Object.is(actual, expected)) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
34
|
-
throw new assertion_error_js_1.AssertionError(`Expected "actual" to not be strictly equal to: ${(0, format_js_1.format)(actual)}${msgSuffix}\n`);
|
|
35
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `expected` object is a subset of `actual` object,
|
|
3
|
-
* deeply. If not, then throw a diff of the objects, with mismatching
|
|
4
|
-
* properties highlighted.
|
|
5
|
-
*
|
|
6
|
-
* @example Usage
|
|
7
|
-
* ```ts ignore
|
|
8
|
-
* import { assertObjectMatch } from "@std/assert";
|
|
9
|
-
*
|
|
10
|
-
* assertObjectMatch({ foo: "bar" }, { foo: "bar" }); // Doesn't throw
|
|
11
|
-
* assertObjectMatch({ foo: "bar" }, { foo: "baz" }); // Throws
|
|
12
|
-
* assertObjectMatch({ foo: 1, bar: 2 }, { foo: 1 }); // Doesn't throw
|
|
13
|
-
* assertObjectMatch({ foo: 1 }, { foo: 1, bar: 2 }); // Throws
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example Usage with nested objects
|
|
17
|
-
* ```ts ignore
|
|
18
|
-
* import { assertObjectMatch } from "@std/assert";
|
|
19
|
-
*
|
|
20
|
-
* assertObjectMatch({ foo: { bar: 3, baz: 4 } }, { foo: { bar: 3 } }); // Doesn't throw
|
|
21
|
-
* assertObjectMatch({ foo: { bar: 3 } }, { foo: { bar: 3, baz: 4 } }); // Throws
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @param actual The actual value to be matched.
|
|
25
|
-
* @param expected The expected value to match.
|
|
26
|
-
* @param msg The optional message to display if the assertion fails.
|
|
27
|
-
*/
|
|
28
|
-
export declare function assertObjectMatch(actual: Record<PropertyKey, any>, expected: Record<PropertyKey, unknown>, msg?: string): void;
|
|
29
|
-
//# sourceMappingURL=object_match.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAE/B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAUN"}
|