xunit.ts 1.4.0 → 3.0.0

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 (214) hide show
  1. package/README.md +44 -19
  2. package/cli.ts +9 -4
  3. package/dist/cli.js +4 -4
  4. package/dist/cli.js.map +1 -1
  5. package/dist/eslint.config.d.ts +3 -0
  6. package/dist/eslint.config.d.ts.map +1 -0
  7. package/dist/eslint.config.js +46 -0
  8. package/dist/eslint.config.js.map +1 -0
  9. package/dist/src/Assertions/Contains.d.ts +1 -1
  10. package/dist/src/Assertions/Contains.d.ts.map +1 -1
  11. package/dist/src/Assertions/Contains.js +4 -4
  12. package/dist/src/Assertions/Contains.js.map +1 -1
  13. package/dist/src/Assertions/Count.d.ts +1 -1
  14. package/dist/src/Assertions/Count.d.ts.map +1 -1
  15. package/dist/src/Assertions/Count.js +4 -4
  16. package/dist/src/Assertions/Count.js.map +1 -1
  17. package/dist/src/Assertions/Defined.d.ts +1 -1
  18. package/dist/src/Assertions/Defined.d.ts.map +1 -1
  19. package/dist/src/Assertions/Defined.js +4 -4
  20. package/dist/src/Assertions/Defined.js.map +1 -1
  21. package/dist/src/Assertions/DoesNotContain.d.ts +1 -1
  22. package/dist/src/Assertions/DoesNotContain.d.ts.map +1 -1
  23. package/dist/src/Assertions/DoesNotContain.js +4 -4
  24. package/dist/src/Assertions/DoesNotContain.js.map +1 -1
  25. package/dist/src/Assertions/DoesNotThrow.d.ts +1 -1
  26. package/dist/src/Assertions/DoesNotThrow.d.ts.map +1 -1
  27. package/dist/src/Assertions/DoesNotThrow.js +4 -4
  28. package/dist/src/Assertions/DoesNotThrow.js.map +1 -1
  29. package/dist/src/Assertions/Empty.d.ts +1 -1
  30. package/dist/src/Assertions/Empty.d.ts.map +1 -1
  31. package/dist/src/Assertions/Empty.js +4 -4
  32. package/dist/src/Assertions/Empty.js.map +1 -1
  33. package/dist/src/Assertions/Equal.d.ts +1 -1
  34. package/dist/src/Assertions/Equal.d.ts.map +1 -1
  35. package/dist/src/Assertions/Equal.js +4 -4
  36. package/dist/src/Assertions/Equal.js.map +1 -1
  37. package/dist/src/Assertions/False.d.ts +1 -1
  38. package/dist/src/Assertions/False.d.ts.map +1 -1
  39. package/dist/src/Assertions/False.js +4 -4
  40. package/dist/src/Assertions/False.js.map +1 -1
  41. package/dist/src/Assertions/InstanceOf.d.ts +1 -1
  42. package/dist/src/Assertions/InstanceOf.d.ts.map +1 -1
  43. package/dist/src/Assertions/InstanceOf.js +4 -4
  44. package/dist/src/Assertions/InstanceOf.js.map +1 -1
  45. package/dist/src/Assertions/NotEmpty.d.ts +1 -1
  46. package/dist/src/Assertions/NotEmpty.d.ts.map +1 -1
  47. package/dist/src/Assertions/NotEmpty.js +4 -4
  48. package/dist/src/Assertions/NotEmpty.js.map +1 -1
  49. package/dist/src/Assertions/NotEqual.d.ts +1 -1
  50. package/dist/src/Assertions/NotEqual.d.ts.map +1 -1
  51. package/dist/src/Assertions/NotEqual.js +4 -4
  52. package/dist/src/Assertions/NotEqual.js.map +1 -1
  53. package/dist/src/Assertions/NotNull.d.ts +1 -1
  54. package/dist/src/Assertions/NotNull.d.ts.map +1 -1
  55. package/dist/src/Assertions/NotNull.js +4 -4
  56. package/dist/src/Assertions/NotNull.js.map +1 -1
  57. package/dist/src/Assertions/Null.d.ts +1 -1
  58. package/dist/src/Assertions/Null.d.ts.map +1 -1
  59. package/dist/src/Assertions/Null.js +4 -4
  60. package/dist/src/Assertions/Null.js.map +1 -1
  61. package/dist/src/Assertions/StringContains.js +5 -5
  62. package/dist/src/Assertions/StringContains.js.map +1 -1
  63. package/dist/src/Assertions/StringDoesNotContain.js +5 -5
  64. package/dist/src/Assertions/StringDoesNotContain.js.map +1 -1
  65. package/dist/src/Assertions/StringDoesNotEndWith.d.ts.map +1 -1
  66. package/dist/src/Assertions/StringDoesNotEndWith.js +5 -7
  67. package/dist/src/Assertions/StringDoesNotEndWith.js.map +1 -1
  68. package/dist/src/Assertions/StringDoesNotMatch.d.ts +17 -0
  69. package/dist/src/Assertions/StringDoesNotMatch.d.ts.map +1 -0
  70. package/dist/src/Assertions/StringDoesNotMatch.js +30 -0
  71. package/dist/src/Assertions/StringDoesNotMatch.js.map +1 -0
  72. package/dist/src/Assertions/StringDoesNotStartWith.js +5 -5
  73. package/dist/src/Assertions/StringDoesNotStartWith.js.map +1 -1
  74. package/dist/src/Assertions/StringEndsWith.d.ts.map +1 -1
  75. package/dist/src/Assertions/StringEndsWith.js +5 -7
  76. package/dist/src/Assertions/StringEndsWith.js.map +1 -1
  77. package/dist/src/Assertions/StringMatches.d.ts +17 -0
  78. package/dist/src/Assertions/StringMatches.d.ts.map +1 -0
  79. package/dist/src/Assertions/StringMatches.js +30 -0
  80. package/dist/src/Assertions/StringMatches.js.map +1 -0
  81. package/dist/src/Assertions/StringStartsWith.js +5 -5
  82. package/dist/src/Assertions/StringStartsWith.js.map +1 -1
  83. package/dist/src/Assertions/Throws.d.ts +1 -1
  84. package/dist/src/Assertions/Throws.d.ts.map +1 -1
  85. package/dist/src/Assertions/Throws.js +5 -5
  86. package/dist/src/Assertions/Throws.js.map +1 -1
  87. package/dist/src/Assertions/True.d.ts +1 -1
  88. package/dist/src/Assertions/True.d.ts.map +1 -1
  89. package/dist/src/Assertions/True.js +4 -4
  90. package/dist/src/Assertions/True.js.map +1 -1
  91. package/dist/src/Assertions/Undefined.d.ts +1 -1
  92. package/dist/src/Assertions/Undefined.d.ts.map +1 -1
  93. package/dist/src/Assertions/Undefined.js +4 -4
  94. package/dist/src/Assertions/Undefined.js.map +1 -1
  95. package/dist/src/Assertions/index.d.ts +18 -14
  96. package/dist/src/Assertions/index.d.ts.map +1 -1
  97. package/dist/src/Assertions/index.js +18 -14
  98. package/dist/src/Assertions/index.js.map +1 -1
  99. package/dist/src/CLI.d.ts +1 -3
  100. package/dist/src/CLI.d.ts.map +1 -1
  101. package/dist/src/CLI.js +9 -7
  102. package/dist/src/CLI.js.map +1 -1
  103. package/dist/src/Factory.d.ts +1 -1
  104. package/dist/src/Factory.d.ts.map +1 -1
  105. package/dist/src/Factory.js +7 -7
  106. package/dist/src/Factory.js.map +1 -1
  107. package/dist/src/Framework/ResultType.js +1 -1
  108. package/dist/src/Framework/ResultType.js.map +1 -1
  109. package/dist/src/Framework/Test.d.ts +1 -1
  110. package/dist/src/Framework/Test.d.ts.map +1 -1
  111. package/dist/src/Framework/Test.js +2 -2
  112. package/dist/src/Framework/Test.js.map +1 -1
  113. package/dist/src/Framework/TestInfo.d.ts +5 -1
  114. package/dist/src/Framework/TestInfo.d.ts.map +1 -1
  115. package/dist/src/Framework/TestName.js +2 -2
  116. package/dist/src/Framework/TestName.js.map +1 -1
  117. package/dist/src/Framework/TestSuite.d.ts +4 -2
  118. package/dist/src/Framework/TestSuite.d.ts.map +1 -1
  119. package/dist/src/Framework/TestSuite.js +8 -5
  120. package/dist/src/Framework/TestSuite.js.map +1 -1
  121. package/dist/src/IO/FileSystem.d.ts +2 -2
  122. package/dist/src/IO/FileSystem.d.ts.map +1 -1
  123. package/dist/src/IO/FileSystem.js +6 -5
  124. package/dist/src/IO/FileSystem.js.map +1 -1
  125. package/dist/src/IO/Output.d.ts +1 -2
  126. package/dist/src/IO/Output.d.ts.map +1 -1
  127. package/dist/src/IO/Output.js.map +1 -1
  128. package/dist/src/Reporters/ConsoleReporter.d.ts +4 -5
  129. package/dist/src/Reporters/ConsoleReporter.d.ts.map +1 -1
  130. package/dist/src/Reporters/ConsoleReporter.js +39 -28
  131. package/dist/src/Reporters/ConsoleReporter.js.map +1 -1
  132. package/dist/src/Reporters/FileReporter.d.ts +4 -5
  133. package/dist/src/Reporters/FileReporter.d.ts.map +1 -1
  134. package/dist/src/Reporters/FileReporter.js +0 -1
  135. package/dist/src/Reporters/FileReporter.js.map +1 -1
  136. package/dist/src/Reporters/JUnitReporter.d.ts.map +1 -1
  137. package/dist/src/Reporters/JUnitReporter.js +1 -1
  138. package/dist/src/Reporters/JUnitReporter.js.map +1 -1
  139. package/dist/src/Reporters/ResultReporter.d.ts +2 -3
  140. package/dist/src/Reporters/ResultReporter.d.ts.map +1 -1
  141. package/dist/src/Reporters/ResultReporter.js +1 -0
  142. package/dist/src/Reporters/ResultReporter.js.map +1 -1
  143. package/dist/src/Reporters/SonarReporter.d.ts.map +1 -1
  144. package/dist/src/Reporters/SonarReporter.js +2 -2
  145. package/dist/src/Reporters/SonarReporter.js.map +1 -1
  146. package/dist/src/Reporters/XMLReporter.d.ts +1 -1
  147. package/dist/src/Reporters/XMLReporter.d.ts.map +1 -1
  148. package/dist/src/Reporters/XMLReporter.js.map +1 -1
  149. package/dist/src/Runners/Runner.d.ts +3 -3
  150. package/dist/src/Runners/Runner.d.ts.map +1 -1
  151. package/dist/src/Runners/Runner.js +1 -1
  152. package/dist/src/Runners/Runner.js.map +1 -1
  153. package/dist/src/Runners/TestRunner.d.ts +4 -2
  154. package/dist/src/Runners/TestRunner.d.ts.map +1 -1
  155. package/dist/src/Runners/TestRunner.js +13 -8
  156. package/dist/src/Runners/TestRunner.js.map +1 -1
  157. package/dist/src/Runners/TestSuiteLoader.d.ts.map +1 -1
  158. package/dist/src/Runners/TestSuiteLoader.js +32 -18
  159. package/dist/src/Runners/TestSuiteLoader.js.map +1 -1
  160. package/dist/src/Runners/TestSuiteRunner.d.ts +4 -4
  161. package/dist/src/Runners/TestSuiteRunner.d.ts.map +1 -1
  162. package/dist/src/Runners/TestSuiteRunner.js +3 -3
  163. package/dist/src/Runners/TestSuiteRunner.js.map +1 -1
  164. package/dist/xunit.d.ts +2 -2
  165. package/dist/xunit.d.ts.map +1 -1
  166. package/dist/xunit.js +3 -3
  167. package/dist/xunit.js.map +1 -1
  168. package/eslint.config.ts +44 -0
  169. package/package.json +18 -14
  170. package/src/Assertions/Contains.ts +3 -3
  171. package/src/Assertions/Count.ts +3 -3
  172. package/src/Assertions/Defined.ts +3 -3
  173. package/src/Assertions/DoesNotContain.ts +3 -3
  174. package/src/Assertions/DoesNotThrow.ts +3 -3
  175. package/src/Assertions/Empty.ts +3 -3
  176. package/src/Assertions/Equal.ts +4 -3
  177. package/src/Assertions/False.ts +3 -3
  178. package/src/Assertions/InstanceOf.ts +3 -3
  179. package/src/Assertions/NotEmpty.ts +3 -3
  180. package/src/Assertions/NotEqual.ts +4 -3
  181. package/src/Assertions/NotNull.ts +3 -3
  182. package/src/Assertions/Null.ts +3 -3
  183. package/src/Assertions/StringContains.ts +3 -3
  184. package/src/Assertions/StringDoesNotContain.ts +3 -3
  185. package/src/Assertions/StringDoesNotEndWith.ts +3 -5
  186. package/src/Assertions/StringDoesNotMatch.ts +28 -0
  187. package/src/Assertions/StringDoesNotStartWith.ts +3 -3
  188. package/src/Assertions/StringEndsWith.ts +3 -5
  189. package/src/Assertions/StringMatches.ts +28 -0
  190. package/src/Assertions/StringStartsWith.ts +3 -3
  191. package/src/Assertions/Throws.ts +4 -4
  192. package/src/Assertions/True.ts +3 -3
  193. package/src/Assertions/Undefined.ts +3 -3
  194. package/src/Assertions/index.ts +19 -25
  195. package/src/CLI.ts +11 -7
  196. package/src/Factory.ts +11 -9
  197. package/src/Framework/Test.ts +2 -2
  198. package/src/Framework/TestInfo.ts +7 -1
  199. package/src/Framework/TestName.ts +2 -2
  200. package/src/Framework/TestSuite.ts +12 -7
  201. package/src/IO/FileSystem.ts +7 -5
  202. package/src/IO/Output.ts +1 -1
  203. package/src/Reporters/ConsoleReporter.ts +14 -12
  204. package/src/Reporters/FileReporter.ts +7 -5
  205. package/src/Reporters/JUnitReporter.ts +3 -2
  206. package/src/Reporters/ResultReporter.ts +4 -3
  207. package/src/Reporters/SonarReporter.ts +4 -2
  208. package/src/Reporters/XMLReporter.ts +2 -2
  209. package/src/Runners/Runner.ts +5 -5
  210. package/src/Runners/TestRunner.ts +19 -11
  211. package/src/Runners/TestSuiteLoader.ts +14 -7
  212. package/src/Runners/TestSuiteRunner.ts +7 -7
  213. package/tsconfig.json +3 -0
  214. package/xunit.ts +3 -4
package/README.md CHANGED
@@ -18,16 +18,18 @@ Detailed documentation is available at https://ecoAPM.github.io/xunit.ts
18
18
 
19
19
  ### Requirements
20
20
 
21
- - Node.js 14, 16, 18
21
+ - Node.js 24+
22
22
 
23
- (other versions may work, but only the latest minor release for each active LTS version is supported)
23
+ (other versions may work, but only the latest minor release for each current/active/maintenance LTS version is supported)
24
24
 
25
25
  - A supported TypeScript compiler
26
- - TypeScript (v4, v5)
27
- - Vite (v2, v3, v4)
28
- - Rollup (v2, v3)
29
- - Parcel (v1, v2)
30
- - Webpack (v5)
26
+ - TypeScript 5+
27
+ - Vite 6+
28
+ - Rollup 4+
29
+ - Parcel 2+
30
+ - Webpack 5+
31
+
32
+ Ongoing commercial support for legacy versions is available for [Corporate, Premier, and Title Sponsors](https://github.com/sponsors/ecoAPM).
31
33
 
32
34
  ### Installation
33
35
 
@@ -43,11 +45,11 @@ At a minimum, your `tsconfig.json` will require the following:
43
45
 
44
46
  ```json
45
47
  {
46
- "compilerOptions": {
47
- "target": "ES2015", //or "ES6"
48
- "module": "CommonJS",
49
- "experimentalDecorators": true
50
- }
48
+ "compilerOptions": {
49
+ "target": "ES2015", //or "ES6"
50
+ "module": "CommonJS",
51
+ "experimentalDecorators": true
52
+ }
51
53
  }
52
54
  ```
53
55
 
@@ -61,10 +63,10 @@ If you're using a bundler, you'll need to declare `xunit.ts` as an `external` in
61
63
  import { Test, TestSuite } from 'xunit.ts';
62
64
 
63
65
  export default class MyTestSuite extends TestSuite {
64
- @Test()
65
- async MyFirstTest() {
66
- this.assert.equal(2, 1 + 1);
67
- }
66
+ @Test()
67
+ MyFirstTest() {
68
+ this.assert.equal(2, 1 + 1);
69
+ }
68
70
  }
69
71
  ```
70
72
 
@@ -86,9 +88,9 @@ You can also run `xunit.ts` from a script in your `package.json`:
86
88
 
87
89
  ```json
88
90
  {
89
- "scripts": {
90
- "test": "tsc --outDir compiled_tests_dir && xunit compiled_tests_dir"
91
- }
91
+ "scripts": {
92
+ "test": "tsc --outDir compiled_tests_dir && xunit compiled_tests_dir"
93
+ }
92
94
  }
93
95
  ```
94
96
 
@@ -96,6 +98,29 @@ You can also run `xunit.ts` from a script in your `package.json`:
96
98
 
97
99
  The `xunit` command can take one or more `--filter` flags (`-f` alias) followed by a regular expression to match `TestSuiteName.TestMethodName`. See the [full documentation](https://ecoAPM.github.io/xunit.ts) for more details.
98
100
 
101
+ ### Asynchronous tests
102
+
103
+ Async tests can live side-by-side with your synchronous tests!
104
+
105
+ `MyTestSuite.ts`:
106
+
107
+ ```ts
108
+ import { Test, TestSuite } from 'xunit.ts';
109
+
110
+ export default class MyTestSuite extends TestSuite {
111
+ @Test()
112
+ SyncTest() {
113
+ this.assert.equal(2, 1 + 1);
114
+ }
115
+
116
+ @Test()
117
+ async AsyncTest() {
118
+ const hardMath = await Promise.resolve(1 + 1);
119
+ this.assert.equal(2, hardMath);
120
+ }
121
+ }
122
+ ```
123
+
99
124
  ## Output
100
125
 
101
126
  ### Console
package/cli.ts CHANGED
@@ -1,9 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import process from "process";
3
+ import process from "node:process";
4
+
4
5
  import CLI from "./src/CLI";
5
6
  import Factory from "./src/Factory";
6
7
 
7
- new CLI(Factory.Runner, process)
8
- .run()
9
- .then(success => process.exit(success ? 0 : 1));
8
+ const cli = new CLI(Factory.Runner.bind(this), process);
9
+ const runTests = cli.run();
10
+
11
+ runTests.then(
12
+ success => process.exit(success ? 0 : 1),
13
+ (reason: unknown) => console.log(reason)
14
+ );
package/dist/cli.js CHANGED
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- const process_1 = __importDefault(require("process"));
7
+ const node_process_1 = __importDefault(require("node:process"));
8
8
  const CLI_1 = __importDefault(require("./src/CLI"));
9
9
  const Factory_1 = __importDefault(require("./src/Factory"));
10
- new CLI_1.default(Factory_1.default.Runner, process_1.default)
11
- .run()
12
- .then(success => process_1.default.exit(success ? 0 : 1));
10
+ const cli = new CLI_1.default(Factory_1.default.Runner.bind(this), node_process_1.default);
11
+ const runTests = cli.run();
12
+ runTests.then(success => node_process_1.default.exit(success ? 0 : 1), (reason) => console.log(reason));
13
13
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;;;;AAEA,sDAA8B;AAC9B,oDAA4B;AAC5B,4DAAoC;AAEpC,IAAI,aAAG,CAAC,iBAAO,CAAC,MAAM,EAAE,iBAAO,CAAC;KAC9B,GAAG,EAAE;KACL,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAmC;AAEnC,oDAA4B;AAC5B,4DAAoC;AAEpC,MAAM,GAAG,GAAG,IAAI,aAAG,CAAC,iBAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,sBAAO,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;AAE3B,QAAQ,CAAC,IAAI,CACZ,OAAO,CAAC,EAAE,CAAC,sBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACxC,CAAC,MAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CACxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("eslint/config").Config[];
2
+ export default _default;
3
+ //# sourceMappingURL=eslint.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":";AAMA,wBAqCG"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const js_1 = __importDefault(require("@eslint/js"));
7
+ const eslint_plugin_1 = __importDefault(require("@stylistic/eslint-plugin"));
8
+ const config_1 = require("eslint/config");
9
+ const eslint_plugin_simple_import_sort_1 = __importDefault(require("eslint-plugin-simple-import-sort"));
10
+ const typescript_eslint_1 = __importDefault(require("typescript-eslint"));
11
+ exports.default = (0, config_1.defineConfig)([
12
+ {
13
+ ignores: ["dist"]
14
+ },
15
+ {
16
+ languageOptions: {
17
+ parser: typescript_eslint_1.default.parser,
18
+ parserOptions: { projectService: true }
19
+ },
20
+ plugins: {
21
+ "@stylistic": eslint_plugin_1.default,
22
+ "simple-import-sort": eslint_plugin_simple_import_sort_1.default
23
+ },
24
+ files: ["**/*.ts"],
25
+ extends: [
26
+ js_1.default.configs.recommended,
27
+ typescript_eslint_1.default.configs.recommended,
28
+ typescript_eslint_1.default.configs.strictTypeChecked,
29
+ typescript_eslint_1.default.configs.stylisticTypeChecked
30
+ ],
31
+ rules: {
32
+ "indent": ["warn", "tab"],
33
+ "quotes": ["warn", "double"],
34
+ "simple-import-sort/imports": "warn",
35
+ "simple-import-sort/exports": "warn",
36
+ "sort-imports": "off",
37
+ "@stylistic/object-curly-spacing": ["warn", "always"],
38
+ "@stylistic/semi": ["error", "always"],
39
+ "@typescript-eslint/no-confusing-void-expression": "off",
40
+ "@typescript-eslint/no-extraneous-class": "off",
41
+ "@typescript-eslint/no-unsafe-function-type": "off",
42
+ "@typescript-eslint/restrict-template-expressions": "off"
43
+ }
44
+ }
45
+ ]);
46
+ //# sourceMappingURL=eslint.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.config.js","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAC5B,6EAAiD;AACjD,0CAA6C;AAC7C,wGAAoD;AACpD,0EAAyC;AAEzC,kBAAe,IAAA,qBAAY,EAAC;IAC3B;QACC,OAAO,EAAE,CAAC,MAAM,CAAC;KACjB;IACD;QACC,eAAe,EAAE;YAChB,MAAM,EAAE,2BAAQ,CAAC,MAAM;YACvB,aAAa,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;SACvC;QACD,OAAO,EAAE;YACR,YAAY,EAAE,uBAAS;YACvB,oBAAoB,EAAE,0CAAI;SAC1B;QACD,KAAK,EAAE,CAAC,SAAS,CAAC;QAClB,OAAO,EAAE;YACR,YAAE,CAAC,OAAO,CAAC,WAAW;YACtB,2BAAQ,CAAC,OAAO,CAAC,WAAW;YAC5B,2BAAQ,CAAC,OAAO,CAAC,iBAAiB;YAClC,2BAAQ,CAAC,OAAO,CAAC,oBAAoB;SACrC;QACD,KAAK,EAAE;YACN,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;YACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YAE5B,4BAA4B,EAAE,MAAM;YACpC,4BAA4B,EAAE,MAAM;YACpC,cAAc,EAAE,KAAK;YAErB,iCAAiC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YACrD,iBAAiB,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YAEtC,iDAAiD,EAAE,KAAK;YACxD,wCAAwC,EAAE,KAAK;YAC/C,4CAA4C,EAAE,KAAK;YACnD,kDAAkD,EAAE,KAAK;SACzD;KACD;CACD,CAAC,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * @example
14
14
  * this.assert.contains(needle, haystack);
15
15
  */
16
- export default function Contains<T>(needle: T, haystack: ReadonlyArray<T>, message?: string): void;
16
+ export default function Contains<T>(needle: T, haystack: readonly T[], message?: string): void;
17
17
  //# sourceMappingURL=Contains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contains.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Contains.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAU1F"}
1
+ {"version":3,"file":"Contains.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Contains.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,QAUtF"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = Contains;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that an array contains a given element
6
7
  *
@@ -20,11 +21,10 @@ function Contains(needle, haystack, message) {
20
21
  if (haystack.includes(needle)) {
21
22
  return;
22
23
  }
23
- throw new assert_1.AssertionError({
24
- message: message || "Expected array containing expression, but array did not contain expression",
24
+ throw new node_assert_1.AssertionError({
25
+ message: message !== null && message !== void 0 ? message : "Expected array containing expression, but array did not contain expression",
25
26
  expected: needle,
26
27
  actual: haystack
27
28
  });
28
29
  }
29
- exports.default = Contains;
30
30
  //# sourceMappingURL=Contains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contains.js","sourceRoot":"","sources":["../../../src/Assertions/Contains.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,QAAQ,CAAI,MAAS,EAAE,QAA0B,EAAE,OAAgB;IAC1F,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAC9B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,4EAA4E;QAChG,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,QAAQ;KAChB,CAAC,CAAC;AACJ,CAAC;AAVD,2BAUC"}
1
+ {"version":3,"file":"Contains.js","sourceRoot":"","sources":["../../../src/Assertions/Contains.ts"],"names":[],"mappings":";;AAiBA,2BAUC;AA3BD,6CAA6C;AAE7C;;;;;;;;;;;;;;GAcG;AACH,SAAwB,QAAQ,CAAI,MAAS,EAAE,QAAsB,EAAE,OAAgB;IACtF,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,4EAA4E;QAChG,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,QAAQ;KAChB,CAAC,CAAC;AACJ,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * @example
14
14
  * this.assert.count(expected, array);
15
15
  */
16
- export default function Count(expected: number, array: ReadonlyArray<any>, message?: string): void;
16
+ export default function Count(expected: number, array: readonly unknown[], message?: string): void;
17
17
  //# sourceMappingURL=Count.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Count.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Count.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAU1F"}
1
+ {"version":3,"file":"Count.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Count.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,QAU1F"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = Count;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that an array contains a certain number of elements
6
7
  *
@@ -20,11 +21,10 @@ function Count(expected, array, message) {
20
21
  if (array.length === expected) {
21
22
  return;
22
23
  }
23
- throw new assert_1.AssertionError({
24
- message: message || `Expected array with ${expected} elements, but array had ${array.length} elements`,
24
+ throw new node_assert_1.AssertionError({
25
+ message: message !== null && message !== void 0 ? message : `Expected array with ${expected} elements, but array had ${array.length} elements`,
25
26
  expected: expected,
26
27
  actual: array.length
27
28
  });
28
29
  }
29
- exports.default = Count;
30
30
  //# sourceMappingURL=Count.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Count.js","sourceRoot":"","sources":["../../../src/Assertions/Count.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,KAAK,CAAC,QAAgB,EAAE,KAAyB,EAAE,OAAgB;IAC1F,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE;QAC9B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,uBAAuB,QAAQ,4BAA4B,KAAK,CAAC,MAAM,WAAW;QACtG,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;AACJ,CAAC;AAVD,wBAUC"}
1
+ {"version":3,"file":"Count.js","sourceRoot":"","sources":["../../../src/Assertions/Count.ts"],"names":[],"mappings":";;AAiBA,wBAUC;AA3BD,6CAA6C;AAE7C;;;;;;;;;;;;;;GAcG;AACH,SAAwB,KAAK,CAAC,QAAgB,EAAE,KAAyB,EAAE,OAAgB;IAC1F,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,uBAAuB,QAAQ,4BAA4B,KAAK,CAAC,MAAM,WAAW;QACtG,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;AACJ,CAAC"}
@@ -12,5 +12,5 @@
12
12
  * @example
13
13
  * this.assert.defined(expression);
14
14
  */
15
- export default function Defined(expression: any, message?: string): void;
15
+ export default function Defined(expression: unknown, message?: string): void;
16
16
  //# sourceMappingURL=Defined.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Defined.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Defined.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,QAUhE"}
1
+ {"version":3,"file":"Defined.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Defined.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAUpE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = Defined;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that a value is defined (any value other than `undefined`)
6
7
  *
@@ -19,11 +20,10 @@ function Defined(expression, message) {
19
20
  if (expression !== undefined) {
20
21
  return;
21
22
  }
22
- throw new assert_1.AssertionError({
23
- message: message || "Expected expression to be defined, but expression is undefined",
23
+ throw new node_assert_1.AssertionError({
24
+ message: message !== null && message !== void 0 ? message : "Expected expression to be defined, but expression is undefined",
24
25
  expected: "(not undefined expression)",
25
26
  actual: expression
26
27
  });
27
28
  }
28
- exports.default = Defined;
29
29
  //# sourceMappingURL=Defined.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Defined.js","sourceRoot":"","sources":["../../../src/Assertions/Defined.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;GAaG;AACH,SAAwB,OAAO,CAAC,UAAe,EAAE,OAAgB;IAChE,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,gEAAgE;QACpF,QAAQ,EAAE,4BAA4B;QACtC,MAAM,EAAE,UAAU;KAClB,CAAC,CAAC;AACJ,CAAC;AAVD,0BAUC"}
1
+ {"version":3,"file":"Defined.js","sourceRoot":"","sources":["../../../src/Assertions/Defined.ts"],"names":[],"mappings":";;AAgBA,0BAUC;AA1BD,6CAA6C;AAE7C;;;;;;;;;;;;;GAaG;AACH,SAAwB,OAAO,CAAC,UAAmB,EAAE,OAAgB;IACpE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,gEAAgE;QACpF,QAAQ,EAAE,4BAA4B;QACtC,MAAM,EAAE,UAAU;KAClB,CAAC,CAAC;AACJ,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * @example
14
14
  * this.assert.doesNotContain(needle, haystack);
15
15
  */
16
- export default function DoesNotContain<T>(needle: T, haystack: ReadonlyArray<T>, message?: string): void;
16
+ export default function DoesNotContain<T>(needle: T, haystack: readonly T[], message?: string): void;
17
17
  //# sourceMappingURL=DoesNotContain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoesNotContain.d.ts","sourceRoot":"","sources":["../../../src/Assertions/DoesNotContain.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAUhG"}
1
+ {"version":3,"file":"DoesNotContain.d.ts","sourceRoot":"","sources":["../../../src/Assertions/DoesNotContain.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,QAU5F"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = DoesNotContain;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that an array does not contain a given element
6
7
  *
@@ -20,11 +21,10 @@ function DoesNotContain(needle, haystack, message) {
20
21
  if (!haystack.includes(needle)) {
21
22
  return;
22
23
  }
23
- throw new assert_1.AssertionError({
24
- message: message || "Expected array not containing expression, but array contained expression",
24
+ throw new node_assert_1.AssertionError({
25
+ message: message !== null && message !== void 0 ? message : "Expected array not containing expression, but array contained expression",
25
26
  expected: needle,
26
27
  actual: haystack
27
28
  });
28
29
  }
29
- exports.default = DoesNotContain;
30
30
  //# sourceMappingURL=DoesNotContain.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoesNotContain.js","sourceRoot":"","sources":["../../../src/Assertions/DoesNotContain.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,cAAc,CAAI,MAAS,EAAE,QAA0B,EAAE,OAAgB;IAChG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAC/B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,0EAA0E;QAC9F,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,QAAQ;KAChB,CAAC,CAAC;AACJ,CAAC;AAVD,iCAUC"}
1
+ {"version":3,"file":"DoesNotContain.js","sourceRoot":"","sources":["../../../src/Assertions/DoesNotContain.ts"],"names":[],"mappings":";;AAiBA,iCAUC;AA3BD,6CAA6C;AAE7C;;;;;;;;;;;;;;GAcG;AACH,SAAwB,cAAc,CAAI,MAAS,EAAE,QAAsB,EAAE,OAAgB;IAC5F,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,0EAA0E;QAC9F,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,QAAQ;KAChB,CAAC,CAAC;AACJ,CAAC"}
@@ -12,5 +12,5 @@
12
12
  * @example
13
13
  * this.assert.doesNotThrow(() => expression);
14
14
  */
15
- export default function DoesNotThrow(expression: () => any, message?: string): void;
15
+ export default function DoesNotThrow(expression: () => unknown, message?: string): void;
16
16
  //# sourceMappingURL=DoesNotThrow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoesNotThrow.d.ts","sourceRoot":"","sources":["../../../src/Assertions/DoesNotThrow.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,QAW3E"}
1
+ {"version":3,"file":"DoesNotThrow.d.ts","sourceRoot":"","sources":["../../../src/Assertions/DoesNotThrow.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,UAAU,EAAE,MAAM,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAW/E"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = DoesNotThrow;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that an expression does not throw an error/exception
6
7
  *
@@ -21,12 +22,11 @@ function DoesNotThrow(expression, message) {
21
22
  return;
22
23
  }
23
24
  catch (exception) {
24
- throw new assert_1.AssertionError({
25
- message: message || "Expected expression to not throw exception, but expression did throw exception",
25
+ throw new node_assert_1.AssertionError({
26
+ message: message !== null && message !== void 0 ? message : "Expected expression to not throw exception, but expression did throw exception",
26
27
  expected: "(no exception)",
27
28
  actual: exception
28
29
  });
29
30
  }
30
31
  }
31
- exports.default = DoesNotThrow;
32
32
  //# sourceMappingURL=DoesNotThrow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoesNotThrow.js","sourceRoot":"","sources":["../../../src/Assertions/DoesNotThrow.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;GAaG;AACH,SAAwB,YAAY,CAAC,UAAqB,EAAE,OAAgB;IAC3E,IAAI;QACH,UAAU,EAAE,CAAC;QACb,OAAO;KACP;IAAC,OAAO,SAAS,EAAE;QACnB,MAAM,IAAI,uBAAc,CAAC;YACxB,OAAO,EAAE,OAAO,IAAI,gFAAgF;YACpG,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,SAAS;SACjB,CAAC,CAAC;KACH;AACF,CAAC;AAXD,+BAWC"}
1
+ {"version":3,"file":"DoesNotThrow.js","sourceRoot":"","sources":["../../../src/Assertions/DoesNotThrow.ts"],"names":[],"mappings":";;AAgBA,+BAWC;AA3BD,6CAA6C;AAE7C;;;;;;;;;;;;;GAaG;AACH,SAAwB,YAAY,CAAC,UAAyB,EAAE,OAAgB;IAC/E,IAAI,CAAC;QACJ,UAAU,EAAE,CAAC;QACb,OAAO;IACR,CAAC;IAAC,OAAO,SAAS,EAAE,CAAC;QACpB,MAAM,IAAI,4BAAc,CAAC;YACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,gFAAgF;YACpG,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,SAAS;SACjB,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
@@ -12,5 +12,5 @@
12
12
  * @example
13
13
  * this.assert.empty(array);
14
14
  */
15
- export default function Empty(array: ReadonlyArray<any>, message?: string): void;
15
+ export default function Empty(array: readonly unknown[], message?: string): void;
16
16
  //# sourceMappingURL=Empty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Empty.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Empty.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAUxE"}
1
+ {"version":3,"file":"Empty.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Empty.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,QAUxE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = Empty;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that an array is empty
6
7
  *
@@ -19,11 +20,10 @@ function Empty(array, message) {
19
20
  if (array.length === 0) {
20
21
  return;
21
22
  }
22
- throw new assert_1.AssertionError({
23
- message: message || "Expected expression to be empty, but expression was not empty",
23
+ throw new node_assert_1.AssertionError({
24
+ message: message !== null && message !== void 0 ? message : "Expected expression to be empty, but expression was not empty",
24
25
  expected: [],
25
26
  actual: array
26
27
  });
27
28
  }
28
- exports.default = Empty;
29
29
  //# sourceMappingURL=Empty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Empty.js","sourceRoot":"","sources":["../../../src/Assertions/Empty.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;GAaG;AACH,SAAwB,KAAK,CAAC,KAAyB,EAAE,OAAgB;IACxE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,+DAA+D;QACnF,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;AACJ,CAAC;AAVD,wBAUC"}
1
+ {"version":3,"file":"Empty.js","sourceRoot":"","sources":["../../../src/Assertions/Empty.ts"],"names":[],"mappings":";;AAgBA,wBAUC;AA1BD,6CAA6C;AAE7C;;;;;;;;;;;;;GAaG;AACH,SAAwB,KAAK,CAAC,KAAyB,EAAE,OAAgB;IACxE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,+DAA+D;QACnF,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;AACJ,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * @example
14
14
  * this.assert.equal(expected, actual);
15
15
  */
16
- export default function Equal(expected: any, actual: any, message?: string): void;
16
+ export default function Equal(expected: unknown, actual: unknown, message?: string): void;
17
17
  //# sourceMappingURL=Equal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Equal.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Equal.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,QAUzE"}
1
+ {"version":3,"file":"Equal.d.ts","sourceRoot":"","sources":["../../../src/Assertions/Equal.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAUjF"}
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const assert_1 = require("assert");
6
+ exports.default = Equal;
7
+ const node_assert_1 = require("node:assert");
7
8
  const lodash_isequal_1 = __importDefault(require("lodash.isequal"));
8
9
  /**
9
10
  * Asserts that two values are equal
@@ -24,11 +25,10 @@ function Equal(expected, actual, message) {
24
25
  if ((0, lodash_isequal_1.default)(actual, expected)) {
25
26
  return;
26
27
  }
27
- throw new assert_1.AssertionError({
28
- message: message || "Expected expressions to be equal, but expressions are not equal",
28
+ throw new node_assert_1.AssertionError({
29
+ message: message !== null && message !== void 0 ? message : "Expected expressions to be equal, but expressions are not equal",
29
30
  expected: expected,
30
31
  actual: actual,
31
32
  });
32
33
  }
33
- exports.default = Equal;
34
34
  //# sourceMappingURL=Equal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Equal.js","sourceRoot":"","sources":["../../../src/Assertions/Equal.ts"],"names":[],"mappings":";;;;;AAAA,mCAAwC;AACxC,oEAAmC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,KAAK,CAAC,QAAa,EAAE,MAAW,EAAE,OAAgB;IACzE,IAAI,IAAA,wBAAK,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;QAC5B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,iEAAiE;QACrF,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,MAAM;KACd,CAAC,CAAC;AACJ,CAAC;AAVD,wBAUC"}
1
+ {"version":3,"file":"Equal.js","sourceRoot":"","sources":["../../../src/Assertions/Equal.ts"],"names":[],"mappings":";;;;;AAmBA,wBAUC;AA7BD,6CAA6C;AAE7C,oEAAmC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,KAAK,CAAC,QAAiB,EAAE,MAAe,EAAE,OAAgB;IACjF,IAAI,IAAA,wBAAK,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,iEAAiE;QACrF,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,MAAM;KACd,CAAC,CAAC;AACJ,CAAC"}
@@ -12,5 +12,5 @@
12
12
  * @example
13
13
  * this.assert.false(expression);
14
14
  */
15
- export default function False(expression: any, message?: string): void;
15
+ export default function False(expression: unknown, message?: string): void;
16
16
  //# sourceMappingURL=False.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"False.d.ts","sourceRoot":"","sources":["../../../src/Assertions/False.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,QAU9D"}
1
+ {"version":3,"file":"False.d.ts","sourceRoot":"","sources":["../../../src/Assertions/False.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAUlE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = False;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that a given value is equal to `false`
6
7
  *
@@ -19,11 +20,10 @@ function False(expression, message) {
19
20
  if (expression === false) {
20
21
  return;
21
22
  }
22
- throw new assert_1.AssertionError({
23
- message: message || "Expected expression to be false, but expression is not false",
23
+ throw new node_assert_1.AssertionError({
24
+ message: message !== null && message !== void 0 ? message : "Expected expression to be false, but expression is not false",
24
25
  expected: false,
25
26
  actual: expression
26
27
  });
27
28
  }
28
- exports.default = False;
29
29
  //# sourceMappingURL=False.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"False.js","sourceRoot":"","sources":["../../../src/Assertions/False.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;GAaG;AACH,SAAwB,KAAK,CAAC,UAAe,EAAE,OAAgB;IAC9D,IAAI,UAAU,KAAK,KAAK,EAAE;QACzB,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,8DAA8D;QAClF,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,UAAU;KAClB,CAAC,CAAC;AACJ,CAAC;AAVD,wBAUC"}
1
+ {"version":3,"file":"False.js","sourceRoot":"","sources":["../../../src/Assertions/False.ts"],"names":[],"mappings":";;AAgBA,wBAUC;AA1BD,6CAA6C;AAE7C;;;;;;;;;;;;;GAaG;AACH,SAAwB,KAAK,CAAC,UAAmB,EAAE,OAAgB;IAClE,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,8DAA8D;QAClF,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,UAAU;KAClB,CAAC,CAAC;AACJ,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * @example
14
14
  * this.assert.instanceOf(type, object);
15
15
  */
16
- export default function InstanceOf(type: any, expression: any, message?: string): void;
16
+ export default function InstanceOf(type: Function, expression: unknown, message?: string): void;
17
17
  //# sourceMappingURL=InstanceOf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceOf.d.ts","sourceRoot":"","sources":["../../../src/Assertions/InstanceOf.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,QAU9E"}
1
+ {"version":3,"file":"InstanceOf.d.ts","sourceRoot":"","sources":["../../../src/Assertions/InstanceOf.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAUvF"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const assert_1 = require("assert");
3
+ exports.default = InstanceOf;
4
+ const node_assert_1 = require("node:assert");
4
5
  /**
5
6
  * Asserts that a value is an instance of a certain type
6
7
  *
@@ -20,11 +21,10 @@ function InstanceOf(type, expression, message) {
20
21
  if (expression instanceof type) {
21
22
  return;
22
23
  }
23
- throw new assert_1.AssertionError({
24
- message: message || `Expected expression of type, but was ${typeof expression}`,
24
+ throw new node_assert_1.AssertionError({
25
+ message: message !== null && message !== void 0 ? message : `Expected expression of type, but was ${typeof expression}`,
25
26
  expected: type.name,
26
27
  actual: typeof expression
27
28
  });
28
29
  }
29
- exports.default = InstanceOf;
30
30
  //# sourceMappingURL=InstanceOf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceOf.js","sourceRoot":"","sources":["../../../src/Assertions/InstanceOf.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AAExC;;;;;;;;;;;;;;GAcG;AACH,SAAwB,UAAU,CAAC,IAAS,EAAE,UAAe,EAAE,OAAgB;IAC9E,IAAI,UAAU,YAAY,IAAI,EAAE;QAC/B,OAAO;KACP;IAED,MAAM,IAAI,uBAAc,CAAC;QACxB,OAAO,EAAE,OAAO,IAAI,wCAAwC,OAAO,UAAU,EAAE;QAC/E,QAAQ,EAAE,IAAI,CAAC,IAAI;QACnB,MAAM,EAAE,OAAO,UAAU;KACzB,CAAC,CAAC;AACJ,CAAC;AAVD,6BAUC"}
1
+ {"version":3,"file":"InstanceOf.js","sourceRoot":"","sources":["../../../src/Assertions/InstanceOf.ts"],"names":[],"mappings":";;AAiBA,6BAUC;AA3BD,6CAA6C;AAE7C;;;;;;;;;;;;;;GAcG;AACH,SAAwB,UAAU,CAAC,IAAc,EAAE,UAAmB,EAAE,OAAgB;IACvF,IAAI,UAAU,YAAY,IAAI,EAAE,CAAC;QAChC,OAAO;IACR,CAAC;IAED,MAAM,IAAI,4BAAc,CAAC;QACxB,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,wCAAwC,OAAO,UAAU,EAAE;QAC/E,QAAQ,EAAE,IAAI,CAAC,IAAI;QACnB,MAAM,EAAE,OAAO,UAAU;KACzB,CAAC,CAAC;AACJ,CAAC"}
@@ -12,5 +12,5 @@
12
12
  * @example
13
13
  * this.assert.notEmpty(array);
14
14
  */
15
- export default function NotEmpty(array: ReadonlyArray<any>, message?: string): void;
15
+ export default function NotEmpty(array: readonly unknown[], message?: string): void;
16
16
  //# sourceMappingURL=NotEmpty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotEmpty.d.ts","sourceRoot":"","sources":["../../../src/Assertions/NotEmpty.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAU3E"}
1
+ {"version":3,"file":"NotEmpty.d.ts","sourceRoot":"","sources":["../../../src/Assertions/NotEmpty.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,QAU3E"}