@mtkruto/node 0.0.981 → 0.0.983

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