@mtkruto/node 0.0.971 → 0.0.972

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.
Files changed (131) hide show
  1. package/esm/constants.d.ts +1 -1
  2. package/esm/constants.js +1 -1
  3. package/esm/deps/deno.land/std@0.196.0/assert/_constants.d.ts +1 -0
  4. package/esm/deps/deno.land/std@0.196.0/assert/_constants.js +2 -0
  5. package/esm/deps/deno.land/std@0.196.0/assert/assert.d.ts +2 -0
  6. package/esm/deps/deno.land/std@0.196.0/assert/assert.js +8 -0
  7. package/esm/deps/deno.land/std@0.196.0/assert/assert_almost_equals.d.ts +18 -0
  8. package/esm/deps/deno.land/std@0.196.0/assert/assert_almost_equals.js +32 -0
  9. package/esm/deps/deno.land/std@0.196.0/assert/assert_array_includes.d.ts +14 -0
  10. package/esm/deps/deno.land/std@0.196.0/assert/assert_array_includes.js +38 -0
  11. package/esm/deps/deno.land/std@0.196.0/assert/assert_equals.d.ts +17 -0
  12. package/esm/deps/deno.land/std@0.196.0/assert/assert_equals.js +45 -0
  13. package/esm/deps/deno.land/std@0.196.0/assert/assert_exists.d.ts +5 -0
  14. package/esm/deps/deno.land/std@0.196.0/assert/assert_exists.js +14 -0
  15. package/esm/deps/deno.land/std@0.196.0/assert/assert_false.d.ts +4 -0
  16. package/esm/deps/deno.land/std@0.196.0/assert/assert_false.js +7 -0
  17. package/esm/deps/deno.land/std@0.196.0/assert/assert_instance_of.d.ts +8 -0
  18. package/esm/deps/deno.land/std@0.196.0/assert/assert_instance_of.js +38 -0
  19. package/esm/deps/deno.land/std@0.196.0/assert/assert_is_error.d.ts +7 -0
  20. package/esm/deps/deno.land/std@0.196.0/assert/assert_is_error.js +26 -0
  21. package/esm/deps/deno.land/std@0.196.0/assert/assert_match.d.ts +5 -0
  22. package/esm/deps/deno.land/std@0.196.0/assert/assert_match.js +13 -0
  23. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_equals.d.ts +14 -0
  24. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_equals.js +37 -0
  25. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_instance_of.d.ts +5 -0
  26. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_instance_of.js +14 -0
  27. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_match.d.ts +5 -0
  28. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_match.js +14 -0
  29. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_strict_equals.d.ts +11 -0
  30. package/esm/deps/deno.land/std@0.196.0/assert/assert_not_strict_equals.js +20 -0
  31. package/esm/deps/deno.land/std@0.196.0/assert/assert_object_match.d.ts +5 -0
  32. package/esm/deps/deno.land/std@0.196.0/assert/assert_object_match.js +78 -0
  33. package/esm/deps/deno.land/std@0.196.0/assert/assert_rejects.d.ts +64 -0
  34. package/esm/deps/deno.land/std@0.196.0/assert/assert_rejects.js +50 -0
  35. package/esm/deps/deno.land/std@0.196.0/assert/assert_strict_equals.d.ts +23 -0
  36. package/esm/deps/deno.land/std@0.196.0/assert/assert_strict_equals.js +60 -0
  37. package/esm/deps/deno.land/std@0.196.0/assert/assert_string_includes.d.ts +5 -0
  38. package/esm/deps/deno.land/std@0.196.0/assert/assert_string_includes.js +13 -0
  39. package/esm/deps/deno.land/std@0.196.0/assert/assert_throws.d.ts +54 -0
  40. package/esm/deps/deno.land/std@0.196.0/assert/assert_throws.js +44 -0
  41. package/esm/deps/deno.land/std@0.196.0/assert/assertion_error.d.ts +4 -0
  42. package/esm/deps/deno.land/std@0.196.0/assert/assertion_error.js +12 -0
  43. package/esm/deps/deno.land/std@0.196.0/assert/equal.d.ts +6 -0
  44. package/esm/deps/deno.land/std@0.196.0/assert/equal.js +102 -0
  45. package/esm/deps/deno.land/std@0.196.0/assert/fail.d.ts +4 -0
  46. package/esm/deps/deno.land/std@0.196.0/assert/fail.js +9 -0
  47. package/esm/deps/deno.land/std@0.196.0/assert/mod.d.ts +32 -0
  48. package/esm/deps/deno.land/std@0.196.0/assert/mod.js +33 -0
  49. package/esm/deps/deno.land/std@0.196.0/assert/unimplemented.d.ts +2 -0
  50. package/esm/deps/deno.land/std@0.196.0/assert/unimplemented.js +7 -0
  51. package/esm/deps/deno.land/std@0.196.0/assert/unreachable.d.ts +2 -0
  52. package/esm/deps/deno.land/std@0.196.0/assert/unreachable.js +6 -0
  53. package/esm/deps/deno.land/{std@0.190.0 → std@0.196.0}/fmt/colors.js +2 -2
  54. package/{script/deps/deno.land/std@0.190.0 → esm/deps/deno.land/std@0.196.0}/testing/asserts.d.ts +204 -159
  55. package/esm/deps/deno.land/std@0.196.0/testing/asserts.js +330 -0
  56. package/esm/deps.d.ts +2 -2
  57. package/esm/deps.js +2 -2
  58. package/package.json +1 -1
  59. package/script/constants.d.ts +1 -1
  60. package/script/constants.js +1 -1
  61. package/script/deps/deno.land/std@0.196.0/assert/_constants.d.ts +1 -0
  62. package/script/deps/deno.land/std@0.196.0/assert/_constants.js +5 -0
  63. package/script/deps/deno.land/std@0.196.0/assert/assert.d.ts +2 -0
  64. package/script/deps/deno.land/std@0.196.0/assert/assert.js +12 -0
  65. package/script/deps/deno.land/std@0.196.0/assert/assert_almost_equals.d.ts +18 -0
  66. package/script/deps/deno.land/std@0.196.0/assert/assert_almost_equals.js +36 -0
  67. package/script/deps/deno.land/std@0.196.0/assert/assert_array_includes.d.ts +14 -0
  68. package/script/deps/deno.land/std@0.196.0/assert/assert_array_includes.js +42 -0
  69. package/script/deps/deno.land/std@0.196.0/assert/assert_equals.d.ts +17 -0
  70. package/script/deps/deno.land/std@0.196.0/assert/assert_equals.js +49 -0
  71. package/script/deps/deno.land/std@0.196.0/assert/assert_exists.d.ts +5 -0
  72. package/script/deps/deno.land/std@0.196.0/assert/assert_exists.js +18 -0
  73. package/script/deps/deno.land/std@0.196.0/assert/assert_false.d.ts +4 -0
  74. package/script/deps/deno.land/std@0.196.0/assert/assert_false.js +11 -0
  75. package/script/deps/deno.land/std@0.196.0/assert/assert_instance_of.d.ts +8 -0
  76. package/script/deps/deno.land/std@0.196.0/assert/assert_instance_of.js +42 -0
  77. package/script/deps/deno.land/std@0.196.0/assert/assert_is_error.d.ts +7 -0
  78. package/script/deps/deno.land/std@0.196.0/assert/assert_is_error.js +30 -0
  79. package/script/deps/deno.land/std@0.196.0/assert/assert_match.d.ts +5 -0
  80. package/script/deps/deno.land/std@0.196.0/assert/assert_match.js +17 -0
  81. package/script/deps/deno.land/std@0.196.0/assert/assert_not_equals.d.ts +14 -0
  82. package/script/deps/deno.land/std@0.196.0/assert/assert_not_equals.js +41 -0
  83. package/script/deps/deno.land/std@0.196.0/assert/assert_not_instance_of.d.ts +5 -0
  84. package/script/deps/deno.land/std@0.196.0/assert/assert_not_instance_of.js +18 -0
  85. package/script/deps/deno.land/std@0.196.0/assert/assert_not_match.d.ts +5 -0
  86. package/script/deps/deno.land/std@0.196.0/assert/assert_not_match.js +18 -0
  87. package/script/deps/deno.land/std@0.196.0/assert/assert_not_strict_equals.d.ts +11 -0
  88. package/script/deps/deno.land/std@0.196.0/assert/assert_not_strict_equals.js +24 -0
  89. package/script/deps/deno.land/std@0.196.0/assert/assert_object_match.d.ts +5 -0
  90. package/script/deps/deno.land/std@0.196.0/assert/assert_object_match.js +82 -0
  91. package/script/deps/deno.land/std@0.196.0/assert/assert_rejects.d.ts +64 -0
  92. package/script/deps/deno.land/std@0.196.0/assert/assert_rejects.js +54 -0
  93. package/script/deps/deno.land/std@0.196.0/assert/assert_strict_equals.d.ts +23 -0
  94. package/script/deps/deno.land/std@0.196.0/assert/assert_strict_equals.js +64 -0
  95. package/script/deps/deno.land/std@0.196.0/assert/assert_string_includes.d.ts +5 -0
  96. package/script/deps/deno.land/std@0.196.0/assert/assert_string_includes.js +17 -0
  97. package/script/deps/deno.land/std@0.196.0/assert/assert_throws.d.ts +54 -0
  98. package/script/deps/deno.land/std@0.196.0/assert/assert_throws.js +48 -0
  99. package/script/deps/deno.land/std@0.196.0/assert/assertion_error.d.ts +4 -0
  100. package/script/deps/deno.land/std@0.196.0/assert/assertion_error.js +16 -0
  101. package/script/deps/deno.land/std@0.196.0/assert/equal.d.ts +6 -0
  102. package/script/deps/deno.land/std@0.196.0/assert/equal.js +106 -0
  103. package/script/deps/deno.land/std@0.196.0/assert/fail.d.ts +4 -0
  104. package/script/deps/deno.land/std@0.196.0/assert/fail.js +13 -0
  105. package/script/deps/deno.land/std@0.196.0/assert/mod.d.ts +32 -0
  106. package/script/deps/deno.land/std@0.196.0/assert/mod.js +49 -0
  107. package/script/deps/deno.land/std@0.196.0/assert/unimplemented.d.ts +2 -0
  108. package/script/deps/deno.land/std@0.196.0/assert/unimplemented.js +11 -0
  109. package/script/deps/deno.land/std@0.196.0/assert/unreachable.d.ts +2 -0
  110. package/script/deps/deno.land/std@0.196.0/assert/unreachable.js +10 -0
  111. package/script/deps/deno.land/{std@0.190.0 → std@0.196.0}/fmt/colors.js +2 -2
  112. package/{esm/deps/deno.land/std@0.190.0 → script/deps/deno.land/std@0.196.0}/testing/asserts.d.ts +204 -159
  113. package/script/deps/deno.land/std@0.196.0/testing/asserts.js +333 -0
  114. package/script/deps.d.ts +2 -2
  115. package/script/deps.js +2 -2
  116. package/esm/deps/deno.land/std@0.190.0/testing/asserts.js +0 -633
  117. package/script/deps/deno.land/std@0.190.0/testing/asserts.js +0 -659
  118. /package/esm/deps/deno.land/{std@0.190.0/testing/_diff.d.ts → std@0.196.0/_util/diff.d.ts} +0 -0
  119. /package/esm/deps/deno.land/{std@0.190.0/testing/_diff.js → std@0.196.0/_util/diff.js} +0 -0
  120. /package/esm/deps/deno.land/{std@0.190.0/testing → std@0.196.0/assert}/_format.d.ts +0 -0
  121. /package/esm/deps/deno.land/{std@0.190.0/testing → std@0.196.0/assert}/_format.js +0 -0
  122. /package/esm/deps/deno.land/{std@0.190.0 → std@0.196.0}/encoding/base64.d.ts +0 -0
  123. /package/esm/deps/deno.land/{std@0.190.0 → std@0.196.0}/encoding/base64.js +0 -0
  124. /package/esm/deps/deno.land/{std@0.190.0 → std@0.196.0}/fmt/colors.d.ts +0 -0
  125. /package/script/deps/deno.land/{std@0.190.0/testing/_diff.d.ts → std@0.196.0/_util/diff.d.ts} +0 -0
  126. /package/script/deps/deno.land/{std@0.190.0/testing/_diff.js → std@0.196.0/_util/diff.js} +0 -0
  127. /package/script/deps/deno.land/{std@0.190.0/testing → std@0.196.0/assert}/_format.d.ts +0 -0
  128. /package/script/deps/deno.land/{std@0.190.0/testing → std@0.196.0/assert}/_format.js +0 -0
  129. /package/script/deps/deno.land/{std@0.190.0 → std@0.196.0}/encoding/base64.d.ts +0 -0
  130. /package/script/deps/deno.land/{std@0.190.0 → std@0.196.0}/encoding/base64.js +0 -0
  131. /package/script/deps/deno.land/{std@0.190.0 → std@0.196.0}/fmt/colors.d.ts +0 -0
@@ -1,202 +1,178 @@
1
- export declare class AssertionError extends Error {
2
- name: string;
3
- constructor(message: string);
4
- }
5
1
  /**
6
- * Deep equality comparison used in assertions
7
- * @param c actual value
8
- * @param d expected value
2
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/mod.ts` instead.
3
+ *
4
+ * A library of assertion functions.
5
+ * If the assertion is false an `AssertionError` will be thrown which will
6
+ * result in pretty-printed diff of failing assertion.
7
+ *
8
+ * This module is browser compatible, but do not rely on good formatting of
9
+ * values for AssertionError messages in browsers.
10
+ *
11
+ * @module
9
12
  */
10
- export declare function equal(c: unknown, d: unknown): boolean;
11
- /** Make an assertion, error will be thrown if `expr` does not have truthy value. */
12
- export declare function assert(expr: unknown, msg?: string): asserts expr;
13
- /** Make an assertion, error will be thrown if `expr` have truthy value. */
14
- type Falsy = false | 0 | 0n | "" | null | undefined;
15
- export declare function assertFalse(expr: unknown, msg?: string): asserts expr is Falsy;
13
+ export {
16
14
  /**
17
- * Make an assertion that `actual` and `expected` are equal, deeply. If not
18
- * deeply equal, then throw.
15
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert.ts` instead.
19
16
  *
20
- * Type parameter can be specified to ensure values under comparison have the same type.
17
+ * Make an assertion, error will be thrown if `expr` does not have truthy value.
18
+ */
19
+ assert,
20
+ /**
21
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_almost_equals.ts` instead.
22
+ *
23
+ * Make an assertion that `actual` and `expected` are almost equal numbers through
24
+ * a given tolerance. It can be used to take into account IEEE-754 double-precision
25
+ * floating-point representation limitations.
26
+ * If the values are not almost equal then throw.
21
27
  *
22
28
  * @example
23
29
  * ```ts
24
- * import { assertEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
30
+ * import { assertAlmostEquals, assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
25
31
  *
26
- * Deno.test("example", function (): void {
27
- * assertEquals("world", "world");
28
- * assertEquals({ hello: "world" }, { hello: "world" });
29
- * });
32
+ * assertAlmostEquals(0.1, 0.2);
33
+ *
34
+ * // Using a custom tolerance value
35
+ * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16);
36
+ * assertThrows(() => assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17));
30
37
  * ```
31
38
  */
32
- export declare function assertEquals<T>(actual: T, expected: T, msg?: string): void;
39
+ assertAlmostEquals,
33
40
  /**
34
- * Make an assertion that `actual` and `expected` are not equal, deeply.
35
- * If not then throw.
41
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_array_includes.ts` instead.
42
+ *
43
+ * Make an assertion that `actual` includes the `expected` values.
44
+ * If not then an error will be thrown.
36
45
  *
37
46
  * Type parameter can be specified to ensure values under comparison have the same type.
38
47
  *
39
48
  * @example
40
49
  * ```ts
41
- * import { assertNotEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
50
+ * import { assertArrayIncludes } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
42
51
  *
43
- * assertNotEquals<number>(1, 2)
52
+ * assertArrayIncludes<number>([1, 2], [2])
44
53
  * ```
45
54
  */
46
- export declare function assertNotEquals<T>(actual: T, expected: T, msg?: string): void;
55
+ assertArrayIncludes,
47
56
  /**
48
- * Make an assertion that `actual` and `expected` are strictly equal. If
49
- * not then throw.
57
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_equals.ts` instead.
58
+ *
59
+ * Make an assertion that `actual` and `expected` are equal, deeply. If not
60
+ * deeply equal, then throw.
61
+ *
62
+ * Type parameter can be specified to ensure values under comparison have the same type.
50
63
  *
51
64
  * @example
52
65
  * ```ts
53
- * import { assertStrictEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
54
- *
55
- * Deno.test("isStrictlyEqual", function (): void {
56
- * const a = {};
57
- * const b = a;
58
- * assertStrictEquals(a, b);
59
- * });
66
+ * import { assertEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
60
67
  *
61
- * // This test fails
62
- * Deno.test("isNotStrictlyEqual", function (): void {
63
- * const a = {};
64
- * const b = {};
65
- * assertStrictEquals(a, b);
68
+ * Deno.test("example", function (): void {
69
+ * assertEquals("world", "world");
70
+ * assertEquals({ hello: "world" }, { hello: "world" });
66
71
  * });
67
72
  * ```
68
73
  */
69
- export declare function assertStrictEquals<T>(actual: unknown, expected: T, msg?: string): asserts actual is T;
74
+ assertEquals,
70
75
  /**
71
- * Make an assertion that `actual` and `expected` are not strictly equal.
72
- * If the values are strictly equal then throw.
73
- *
74
- * ```ts
75
- * import { assertNotStrictEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
76
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_exists.ts` instead.
76
77
  *
77
- * assertNotStrictEquals(1, 1)
78
- * ```
78
+ * Make an assertion that actual is not null or undefined.
79
+ * If not then throw.
79
80
  */
80
- export declare function assertNotStrictEquals<T>(actual: T, expected: T, msg?: string): void;
81
+ assertExists,
81
82
  /**
82
- * Make an assertion that `actual` and `expected` are almost equal numbers through
83
- * a given tolerance. It can be used to take into account IEEE-754 double-precision
84
- * floating-point representation limitations.
85
- * If the values are not almost equal then throw.
86
- *
87
- * @example
88
- * ```ts
89
- * import { assertAlmostEquals, assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
83
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_false.ts` instead.
90
84
  *
91
- * assertAlmostEquals(0.1, 0.2);
92
- *
93
- * // Using a custom tolerance value
94
- * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16);
95
- * assertThrows(() => assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17));
96
- * ```
85
+ * Make an assertion, error will be thrown if `expr` have truthy value.
97
86
  */
98
- export declare function assertAlmostEquals(actual: number, expected: number, tolerance?: number, msg?: string): void;
99
- type AnyConstructor = new (...args: any[]) => any;
100
- type GetConstructorType<T extends AnyConstructor> = T extends new (...args: any) => infer C ? C : never;
87
+ assertFalse,
101
88
  /**
89
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_instance_of.ts` instead.
90
+ *
102
91
  * Make an assertion that `obj` is an instance of `type`.
103
92
  * If not then throw.
104
93
  */
105
- export declare function assertInstanceOf<T extends AnyConstructor>(actual: unknown, expectedType: T, msg?: string): asserts actual is GetConstructorType<T>;
106
- /**
107
- * Make an assertion that `obj` is not an instance of `type`.
108
- * If so, then throw.
109
- */
110
- export declare function assertNotInstanceOf<A, T>(actual: A, unexpectedType: new (...args: any[]) => T, msg?: string): asserts actual is Exclude<A, T>;
94
+ assertInstanceOf,
95
+ /** @deprecated (will be removed after 1.0.0) Import from `std/assert/assertion_error.ts` instead. */
96
+ AssertionError,
111
97
  /**
112
- * Make an assertion that actual is not null or undefined.
113
- * If not then throw.
98
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_is_error.ts` instead.
99
+ *
100
+ * Make an assertion that `error` is an `Error`.
101
+ * If not then an error will be thrown.
102
+ * An error class and a string that should be included in the
103
+ * error message can also be asserted.
114
104
  */
115
- export declare function assertExists<T>(actual: T, msg?: string): asserts actual is NonNullable<T>;
105
+ assertIsError,
116
106
  /**
117
- * Make an assertion that actual includes expected. If not
107
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_match.ts` instead.
108
+ *
109
+ * Make an assertion that `actual` match RegExp `expected`. If not
118
110
  * then throw.
119
111
  */
120
- export declare function assertStringIncludes(actual: string, expected: string, msg?: string): void;
112
+ assertMatch,
121
113
  /**
122
- * Make an assertion that `actual` includes the `expected` values.
123
- * If not then an error will be thrown.
114
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_not_equals.ts` instead.
115
+ *
116
+ * Make an assertion that `actual` and `expected` are not equal, deeply.
117
+ * If not then throw.
124
118
  *
125
119
  * Type parameter can be specified to ensure values under comparison have the same type.
126
120
  *
127
121
  * @example
128
122
  * ```ts
129
- * import { assertArrayIncludes } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
123
+ * import { assertNotEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
130
124
  *
131
- * assertArrayIncludes<number>([1, 2], [2])
125
+ * assertNotEquals<number>(1, 2)
132
126
  * ```
133
127
  */
134
- export declare function assertArrayIncludes<T>(actual: ArrayLike<T>, expected: ArrayLike<T>, msg?: string): void;
135
- /**
136
- * Make an assertion that `actual` match RegExp `expected`. If not
137
- * then throw.
138
- */
139
- export declare function assertMatch(actual: string, expected: RegExp, msg?: string): void;
128
+ assertNotEquals,
140
129
  /**
141
- * Make an assertion that `actual` not match RegExp `expected`. If match
142
- * then throw.
130
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_not_instance_of.ts` instead.
131
+ *
132
+ * Make an assertion that `obj` is not an instance of `type`.
133
+ * If so, then throw.
143
134
  */
144
- export declare function assertNotMatch(actual: string, expected: RegExp, msg?: string): void;
135
+ assertNotInstanceOf,
145
136
  /**
137
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_not_match.ts` instead.
138
+ *
146
139
  * Make an assertion that `actual` object is a subset of `expected` object, deeply.
147
140
  * If not, then throw.
148
141
  */
149
- export declare function assertObjectMatch(actual: Record<PropertyKey, any>, expected: Record<PropertyKey, unknown>, msg?: string): void;
150
- /**
151
- * Forcefully throws a failed assertion
152
- */
153
- export declare function fail(msg?: string): never;
142
+ assertNotMatch,
154
143
  /**
155
- * Make an assertion that `error` is an `Error`.
156
- * If not then an error will be thrown.
157
- * An error class and a string that should be included in the
158
- * error message can also be asserted.
159
- */
160
- export declare function assertIsError<E extends Error = Error>(error: unknown, ErrorClass?: new (...args: any[]) => E, msgIncludes?: string, msg?: string): asserts error is E;
161
- /**
162
- * Executes a function, expecting it to throw. If it does not, then it
163
- * throws.
144
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_not_strict_equals.ts` instead.
164
145
  *
165
- * @example
166
- * ```ts
167
- * import { assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
146
+ * Make an assertion that `actual` and `expected` are not strictly equal.
147
+ * If the values are strictly equal then throw.
168
148
  *
169
- * Deno.test("doesThrow", function (): void {
170
- * assertThrows((): void => {
171
- * throw new TypeError("hello world!");
172
- * });
173
- * });
149
+ * ```ts
150
+ * import { assertNotStrictEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
174
151
  *
175
- * // This test will not pass.
176
- * Deno.test("fails", function (): void {
177
- * assertThrows((): void => {
178
- * console.log("Hello world");
179
- * });
180
- * });
152
+ * assertNotStrictEquals(1, 1)
181
153
  * ```
182
154
  */
183
- export declare function assertThrows(fn: () => unknown, msg?: string): unknown;
155
+ assertNotStrictEquals,
184
156
  /**
185
- * Executes a function, expecting it to throw. If it does not, then it
186
- * throws. An error class and a string that should be included in the
187
- * error message can also be asserted.
157
+ * Make an assertion that `actual` object is a subset of `expected` object, deeply.
158
+ * If not, then throw.
159
+ */
160
+ assertObjectMatch,
161
+ /**
162
+ * Executes a function which returns a promise, expecting it to reject.
163
+ * If it does not, then it throws. An error class and a string that should be
164
+ * included in the error message can also be asserted.
188
165
  *
189
166
  * @example
190
- *
191
167
  * ```ts
192
- * import { assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
168
+ * import { assertRejects } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
193
169
  *
194
- * Deno.test("doesThrow", function (): void {
195
- * assertThrows((): void => {
170
+ * Deno.test("doesThrow", async function () {
171
+ * await assertRejects(async () => {
196
172
  * throw new TypeError("hello world!");
197
173
  * }, TypeError);
198
- * assertThrows(
199
- * (): void => {
174
+ * await assertRejects(
175
+ * async () => {
200
176
  * throw new TypeError("hello world!");
201
177
  * },
202
178
  * TypeError,
@@ -205,18 +181,16 @@ export declare function assertThrows(fn: () => unknown, msg?: string): unknown;
205
181
  * });
206
182
  *
207
183
  * // This test will not pass.
208
- * Deno.test("fails", function (): void {
209
- * assertThrows((): void => {
210
- * console.log("Hello world");
211
- * });
184
+ * Deno.test("fails", async function () {
185
+ * await assertRejects(
186
+ * async () => {
187
+ * console.log("Hello world");
188
+ * },
189
+ * );
212
190
  * });
213
191
  * ```
214
- */
215
- export declare function assertThrows<E extends Error = Error>(fn: () => unknown, ErrorClass: new (...args: any[]) => E, msgIncludes?: string, msg?: string): E;
216
- /**
217
- * Executes a function which returns a promise, expecting it to reject.
218
192
  *
219
- * @example
193
+ * * @example
220
194
  * ```ts
221
195
  * import { assertRejects } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
222
196
  *
@@ -243,22 +217,56 @@ export declare function assertThrows<E extends Error = Error>(fn: () => unknown,
243
217
  * });
244
218
  * ```
245
219
  */
246
- export declare function assertRejects(fn: () => PromiseLike<unknown>, msg?: string): Promise<unknown>;
220
+ assertRejects,
247
221
  /**
248
- * Executes a function which returns a promise, expecting it to reject.
249
- * If it does not, then it throws. An error class and a string that should be
250
- * included in the error message can also be asserted.
222
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_strict_equals.ts` instead.
223
+ *
224
+ * Make an assertion that `actual` and `expected` are strictly equal. If
225
+ * not then throw.
251
226
  *
252
227
  * @example
253
228
  * ```ts
254
- * import { assertRejects } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
229
+ * import { assertStrictEquals } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
255
230
  *
256
- * Deno.test("doesThrow", async function () {
257
- * await assertRejects(async () => {
231
+ * Deno.test("isStrictlyEqual", function (): void {
232
+ * const a = {};
233
+ * const b = a;
234
+ * assertStrictEquals(a, b);
235
+ * });
236
+ *
237
+ * // This test fails
238
+ * Deno.test("isNotStrictlyEqual", function (): void {
239
+ * const a = {};
240
+ * const b = {};
241
+ * assertStrictEquals(a, b);
242
+ * });
243
+ * ```
244
+ */
245
+ assertStrictEquals,
246
+ /**
247
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_string_includes.ts` instead.
248
+ *
249
+ * Make an assertion that actual includes expected. If not
250
+ * then throw.
251
+ */
252
+ assertStringIncludes,
253
+ /**
254
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/assert_throws.ts` instead.
255
+ *
256
+ * Executes a function, expecting it to throw. If it does not, then it
257
+ * throws. An error class and a string that should be included in the
258
+ * error message can also be asserted.
259
+ *
260
+ * @example
261
+ * ```ts
262
+ * import { assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
263
+ *
264
+ * Deno.test("doesThrow", function (): void {
265
+ * assertThrows((): void => {
258
266
  * throw new TypeError("hello world!");
259
267
  * }, TypeError);
260
- * await assertRejects(
261
- * async () => {
268
+ * assertThrows(
269
+ * (): void => {
262
270
  * throw new TypeError("hello world!");
263
271
  * },
264
272
  * TypeError,
@@ -267,18 +275,55 @@ export declare function assertRejects(fn: () => PromiseLike<unknown>, msg?: stri
267
275
  * });
268
276
  *
269
277
  * // This test will not pass.
270
- * Deno.test("fails", async function () {
271
- * await assertRejects(
272
- * async () => {
273
- * console.log("Hello world");
274
- * },
275
- * );
278
+ * Deno.test("fails", function (): void {
279
+ * assertThrows((): void => {
280
+ * console.log("Hello world");
281
+ * });
276
282
  * });
277
283
  * ```
284
+ *
285
+ * @example
286
+ * ```ts
287
+ * import { assertThrows } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
288
+ *
289
+ * Deno.test("doesThrow", function (): void {
290
+ * assertThrows((): void => {
291
+ * throw new TypeError("hello world!");
292
+ * });
293
+ * });
294
+ *
295
+ * // This test will not pass.
296
+ * Deno.test("fails", function (): void {
297
+ * assertThrows((): void => {
298
+ * console.log("Hello world");
299
+ * });
300
+ * });
301
+ * ```
302
+ */
303
+ assertThrows,
304
+ /**
305
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/equal.ts` instead.
306
+ *
307
+ * Deep equality comparison used in assertions
308
+ * @param c actual value
309
+ * @param d expected value
310
+ */
311
+ equal,
312
+ /**
313
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/fail.ts` instead.
314
+ *
315
+ * Forcefully throws a failed assertion
316
+ */
317
+ fail,
318
+ /**
319
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/unimplemented.ts` instead.
320
+ *
321
+ * Use this to stub out methods that will throw when invoked.
322
+ */
323
+ unimplemented,
324
+ /**
325
+ * @deprecated (will be removed after 1.0.0) Import from `std/assert/unreachable.ts` instead.
326
+ *
327
+ * Use this to assert unreachable code.
278
328
  */
279
- export declare function assertRejects<E extends Error = Error>(fn: () => PromiseLike<unknown>, ErrorClass: new (...args: any[]) => E, msgIncludes?: string, msg?: string): Promise<E>;
280
- /** Use this to stub out methods that will throw when invoked. */
281
- export declare function unimplemented(msg?: string): never;
282
- /** Use this to assert unreachable code. */
283
- export declare function unreachable(): never;
284
- export {};
329
+ unreachable, } from "../assert/mod.js";