@gjsify/assert 0.0.4 → 0.1.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.
package/lib/esm/index.js CHANGED
@@ -1,6 +1,464 @@
1
- export * from "@gjsify/deno_std/node/assert";
2
- import assert from "@gjsify/deno_std/node/assert";
3
- var src_default = assert;
1
+ import { AssertionError } from "./assertion-error.js";
2
+ import { isDeepEqual, isDeepStrictEqual } from "./deep-equal.js";
3
+ function innerFail(obj) {
4
+ if (obj.message instanceof Error) throw obj.message;
5
+ throw new AssertionError({
6
+ actual: obj.actual,
7
+ expected: obj.expected,
8
+ message: obj.message,
9
+ operator: obj.operator,
10
+ stackStartFn: obj.stackStartFn
11
+ });
12
+ }
13
+ function isPromiseLike(val) {
14
+ return val !== null && typeof val === "object" && typeof val.then === "function";
15
+ }
16
+ function ok(value, message) {
17
+ if (!value) {
18
+ innerFail({
19
+ actual: value,
20
+ expected: true,
21
+ message,
22
+ operator: "==",
23
+ stackStartFn: ok
24
+ });
25
+ }
26
+ }
27
+ function equal(actual, expected, message) {
28
+ if (actual != expected) {
29
+ innerFail({
30
+ actual,
31
+ expected,
32
+ message,
33
+ operator: "==",
34
+ stackStartFn: equal
35
+ });
36
+ }
37
+ }
38
+ function notEqual(actual, expected, message) {
39
+ if (actual == expected) {
40
+ innerFail({
41
+ actual,
42
+ expected,
43
+ message,
44
+ operator: "!=",
45
+ stackStartFn: notEqual
46
+ });
47
+ }
48
+ }
49
+ function strictEqual(actual, expected, message) {
50
+ if (!Object.is(actual, expected)) {
51
+ innerFail({
52
+ actual,
53
+ expected,
54
+ message,
55
+ operator: "strictEqual",
56
+ stackStartFn: strictEqual
57
+ });
58
+ }
59
+ }
60
+ function notStrictEqual(actual, expected, message) {
61
+ if (Object.is(actual, expected)) {
62
+ innerFail({
63
+ actual,
64
+ expected,
65
+ message,
66
+ operator: "notStrictEqual",
67
+ stackStartFn: notStrictEqual
68
+ });
69
+ }
70
+ }
71
+ function deepEqual(actual, expected, message) {
72
+ if (!isDeepEqual(actual, expected)) {
73
+ innerFail({
74
+ actual,
75
+ expected,
76
+ message,
77
+ operator: "deepEqual",
78
+ stackStartFn: deepEqual
79
+ });
80
+ }
81
+ }
82
+ function notDeepEqual(actual, expected, message) {
83
+ if (isDeepEqual(actual, expected)) {
84
+ innerFail({
85
+ actual,
86
+ expected,
87
+ message,
88
+ operator: "notDeepEqual",
89
+ stackStartFn: notDeepEqual
90
+ });
91
+ }
92
+ }
93
+ function deepStrictEqual(actual, expected, message) {
94
+ if (!isDeepStrictEqual(actual, expected)) {
95
+ innerFail({
96
+ actual,
97
+ expected,
98
+ message,
99
+ operator: "deepStrictEqual",
100
+ stackStartFn: deepStrictEqual
101
+ });
102
+ }
103
+ }
104
+ function notDeepStrictEqual(actual, expected, message) {
105
+ if (isDeepStrictEqual(actual, expected)) {
106
+ innerFail({
107
+ actual,
108
+ expected,
109
+ message,
110
+ operator: "notDeepStrictEqual",
111
+ stackStartFn: notDeepStrictEqual
112
+ });
113
+ }
114
+ }
115
+ function getActual(fn) {
116
+ const NO_EXCEPTION = /* @__PURE__ */ Symbol("NO_EXCEPTION");
117
+ try {
118
+ fn();
119
+ } catch (e) {
120
+ return e;
121
+ }
122
+ return NO_EXCEPTION;
123
+ }
124
+ async function getActualAsync(fn) {
125
+ const NO_EXCEPTION = /* @__PURE__ */ Symbol("NO_EXCEPTION");
126
+ try {
127
+ if (typeof fn === "function") {
128
+ const result = fn();
129
+ if (isPromiseLike(result)) {
130
+ await result;
131
+ }
132
+ } else {
133
+ await fn;
134
+ }
135
+ } catch (e) {
136
+ return e;
137
+ }
138
+ return NO_EXCEPTION;
139
+ }
140
+ function expectedException(actual, expected, message, fn) {
141
+ if (expected === void 0) return true;
142
+ if (expected instanceof RegExp) {
143
+ const str = String(actual);
144
+ if (expected.test(str)) return true;
145
+ throw new AssertionError({
146
+ actual,
147
+ expected,
148
+ message,
149
+ operator: fn.name,
150
+ stackStartFn: fn
151
+ });
152
+ }
153
+ if (typeof expected === "function") {
154
+ if (expected.prototype !== void 0 && actual instanceof expected) {
155
+ return true;
156
+ }
157
+ if (Error.isPrototypeOf(expected)) {
158
+ return false;
159
+ }
160
+ const result = expected.call({}, actual);
161
+ if (result !== true) {
162
+ throw new AssertionError({
163
+ actual,
164
+ expected,
165
+ message,
166
+ operator: fn.name,
167
+ stackStartFn: fn
168
+ });
169
+ }
170
+ return true;
171
+ }
172
+ if (typeof expected === "object" && expected !== null) {
173
+ const keys = Object.keys(expected);
174
+ for (const key of keys) {
175
+ const expectedObj = expected;
176
+ const actualObj = actual;
177
+ if (typeof actualObj[key] === "string" && expectedObj[key] instanceof RegExp) {
178
+ if (!expectedObj[key].test(actualObj[key])) {
179
+ throw new AssertionError({
180
+ actual,
181
+ expected,
182
+ message,
183
+ operator: fn.name,
184
+ stackStartFn: fn
185
+ });
186
+ }
187
+ } else if (!isDeepStrictEqual(actualObj[key], expectedObj[key])) {
188
+ throw new AssertionError({
189
+ actual,
190
+ expected,
191
+ message,
192
+ operator: fn.name,
193
+ stackStartFn: fn
194
+ });
195
+ }
196
+ }
197
+ return true;
198
+ }
199
+ return true;
200
+ }
201
+ function throws(fn, errorOrMessage, message) {
202
+ if (typeof fn !== "function") {
203
+ throw new TypeError('The "fn" argument must be of type function.');
204
+ }
205
+ let expected;
206
+ if (typeof errorOrMessage === "string") {
207
+ message = errorOrMessage;
208
+ expected = void 0;
209
+ } else {
210
+ expected = errorOrMessage;
211
+ }
212
+ const actual = getActual(fn);
213
+ if (typeof actual === "symbol") {
214
+ innerFail({
215
+ actual: void 0,
216
+ expected,
217
+ message: message || "Missing expected exception.",
218
+ operator: "throws",
219
+ stackStartFn: throws
220
+ });
221
+ }
222
+ if (expected !== void 0) {
223
+ expectedException(actual, expected, message, throws);
224
+ }
225
+ }
226
+ function doesNotThrow(fn, errorOrMessage, message) {
227
+ if (typeof fn !== "function") {
228
+ throw new TypeError('The "fn" argument must be of type function.');
229
+ }
230
+ let expected;
231
+ if (typeof errorOrMessage === "string") {
232
+ message = errorOrMessage;
233
+ expected = void 0;
234
+ } else {
235
+ expected = errorOrMessage;
236
+ }
237
+ const actual = getActual(fn);
238
+ if (typeof actual === "symbol") {
239
+ return;
240
+ }
241
+ if (expected !== void 0 && typeof expected === "function" && expected.prototype !== void 0 && actual instanceof expected) {
242
+ innerFail({
243
+ actual,
244
+ expected,
245
+ message: message || `Got unwanted exception.
246
+ ${actual && actual.message ? actual.message : ""}`,
247
+ operator: "doesNotThrow",
248
+ stackStartFn: doesNotThrow
249
+ });
250
+ }
251
+ if (expected === void 0 || typeof expected === "function" && expected.prototype !== void 0 && actual instanceof expected) {
252
+ innerFail({
253
+ actual,
254
+ expected,
255
+ message: message || `Got unwanted exception.
256
+ ${actual && actual.message ? actual.message : ""}`,
257
+ operator: "doesNotThrow",
258
+ stackStartFn: doesNotThrow
259
+ });
260
+ }
261
+ throw actual;
262
+ }
263
+ async function rejects(asyncFn, errorOrMessage, message) {
264
+ let expected;
265
+ if (typeof errorOrMessage === "string") {
266
+ message = errorOrMessage;
267
+ expected = void 0;
268
+ } else {
269
+ expected = errorOrMessage;
270
+ }
271
+ const actual = await getActualAsync(asyncFn);
272
+ if (typeof actual === "symbol") {
273
+ innerFail({
274
+ actual: void 0,
275
+ expected,
276
+ message: message || "Missing expected rejection.",
277
+ operator: "rejects",
278
+ stackStartFn: rejects
279
+ });
280
+ }
281
+ if (expected !== void 0) {
282
+ expectedException(actual, expected, message, rejects);
283
+ }
284
+ }
285
+ async function doesNotReject(asyncFn, errorOrMessage, message) {
286
+ let expected;
287
+ if (typeof errorOrMessage === "string") {
288
+ message = errorOrMessage;
289
+ expected = void 0;
290
+ } else {
291
+ expected = errorOrMessage;
292
+ }
293
+ const actual = await getActualAsync(asyncFn);
294
+ if (typeof actual !== "symbol") {
295
+ innerFail({
296
+ actual,
297
+ expected,
298
+ message: message || `Got unwanted rejection.
299
+ ${actual && actual.message ? actual.message : ""}`,
300
+ operator: "doesNotReject",
301
+ stackStartFn: doesNotReject
302
+ });
303
+ }
304
+ }
305
+ function fail(actualOrMessage, expected, message, operator, stackStartFn) {
306
+ if (arguments.length === 0 || arguments.length === 1) {
307
+ const msg = arguments.length === 0 ? "Failed" : typeof actualOrMessage === "string" ? actualOrMessage : void 0;
308
+ if (actualOrMessage instanceof Error) throw actualOrMessage;
309
+ throw new AssertionError({
310
+ message: msg || "Failed",
311
+ operator: "fail",
312
+ stackStartFn: fail
313
+ });
314
+ }
315
+ throw new AssertionError({
316
+ actual: actualOrMessage,
317
+ expected,
318
+ message,
319
+ operator: operator || "fail",
320
+ stackStartFn: stackStartFn || fail
321
+ });
322
+ }
323
+ function ifError(value) {
324
+ if (value !== null && value !== void 0) {
325
+ let message = "ifError got unwanted exception: ";
326
+ if (typeof value === "object" && typeof value.message === "string") {
327
+ if (value.message.length === 0 && value.constructor) {
328
+ message += value.constructor.name;
329
+ } else {
330
+ message += value.message;
331
+ }
332
+ } else {
333
+ message += String(value);
334
+ }
335
+ const err = new AssertionError({
336
+ actual: value,
337
+ expected: null,
338
+ message,
339
+ operator: "ifError",
340
+ stackStartFn: ifError
341
+ });
342
+ const origStack = value instanceof Error ? value.stack : void 0;
343
+ if (origStack) {
344
+ err.origStack = origStack;
345
+ }
346
+ throw err;
347
+ }
348
+ }
349
+ function match(actual, expected, message) {
350
+ if (typeof actual !== "string") {
351
+ throw new TypeError('The "actual" argument must be of type string.');
352
+ }
353
+ if (!(expected instanceof RegExp)) {
354
+ throw new TypeError('The "expected" argument must be an instance of RegExp.');
355
+ }
356
+ if (!expected.test(actual)) {
357
+ innerFail({
358
+ actual,
359
+ expected,
360
+ message: message || `The input did not match the regular expression ${expected}. Input:
361
+
362
+ '${actual}'
363
+ `,
364
+ operator: "match",
365
+ stackStartFn: match
366
+ });
367
+ }
368
+ }
369
+ function doesNotMatch(actual, expected, message) {
370
+ if (typeof actual !== "string") {
371
+ throw new TypeError('The "actual" argument must be of type string.');
372
+ }
373
+ if (!(expected instanceof RegExp)) {
374
+ throw new TypeError('The "expected" argument must be an instance of RegExp.');
375
+ }
376
+ if (expected.test(actual)) {
377
+ innerFail({
378
+ actual,
379
+ expected,
380
+ message: message || `The input was expected to not match the regular expression ${expected}. Input:
381
+
382
+ '${actual}'
383
+ `,
384
+ operator: "doesNotMatch",
385
+ stackStartFn: doesNotMatch
386
+ });
387
+ }
388
+ }
389
+ const strict = Object.assign(
390
+ function strict2(value, message) {
391
+ ok(value, message);
392
+ },
393
+ {
394
+ AssertionError,
395
+ ok,
396
+ equal: strictEqual,
397
+ notEqual: notStrictEqual,
398
+ deepEqual: deepStrictEqual,
399
+ notDeepEqual: notDeepStrictEqual,
400
+ deepStrictEqual,
401
+ notDeepStrictEqual,
402
+ strictEqual,
403
+ notStrictEqual,
404
+ throws,
405
+ doesNotThrow,
406
+ rejects,
407
+ doesNotReject,
408
+ fail,
409
+ ifError,
410
+ match,
411
+ doesNotMatch,
412
+ strict: void 0
413
+ }
414
+ );
415
+ strict.strict = strict;
416
+ const assert = Object.assign(
417
+ function assert2(value, message) {
418
+ ok(value, message);
419
+ },
420
+ {
421
+ AssertionError,
422
+ ok,
423
+ equal,
424
+ notEqual,
425
+ strictEqual,
426
+ notStrictEqual,
427
+ deepEqual,
428
+ notDeepEqual,
429
+ deepStrictEqual,
430
+ notDeepStrictEqual,
431
+ throws,
432
+ doesNotThrow,
433
+ rejects,
434
+ doesNotReject,
435
+ fail,
436
+ ifError,
437
+ match,
438
+ doesNotMatch,
439
+ strict
440
+ }
441
+ );
442
+ var index_default = assert;
4
443
  export {
5
- src_default as default
444
+ AssertionError,
445
+ deepEqual,
446
+ deepStrictEqual,
447
+ index_default as default,
448
+ doesNotMatch,
449
+ doesNotReject,
450
+ doesNotThrow,
451
+ equal,
452
+ fail,
453
+ ifError,
454
+ match,
455
+ notDeepEqual,
456
+ notDeepStrictEqual,
457
+ notEqual,
458
+ notStrictEqual,
459
+ ok,
460
+ rejects,
461
+ strict,
462
+ strictEqual,
463
+ throws
6
464
  };
@@ -0,0 +1,75 @@
1
+ const MAX_DEPTH = 3;
2
+ const MAX_ARRAY_LENGTH = 10;
3
+ const MAX_STRING_LENGTH = 128;
4
+ function safeInspect(value, depth = MAX_DEPTH) {
5
+ if (value === null) return "null";
6
+ if (value === void 0) return "undefined";
7
+ switch (typeof value) {
8
+ case "string":
9
+ if (value.length > MAX_STRING_LENGTH) {
10
+ return `'${value.slice(0, MAX_STRING_LENGTH)}...'`;
11
+ }
12
+ return `'${value}'`;
13
+ case "number":
14
+ case "boolean":
15
+ case "bigint":
16
+ return String(value);
17
+ case "symbol":
18
+ return value.toString();
19
+ case "function":
20
+ return `[Function: ${value.name || "anonymous"}]`;
21
+ case "object":
22
+ return inspectObject(value, depth);
23
+ }
24
+ return String(value);
25
+ }
26
+ function inspectObject(obj, depth, seen = /* @__PURE__ */ new WeakSet()) {
27
+ if (seen.has(obj)) return "[Circular]";
28
+ seen.add(obj);
29
+ if (obj instanceof Date) return obj.toISOString();
30
+ if (obj instanceof RegExp) return obj.toString();
31
+ if (obj instanceof Error) return `[${obj.constructor.name}: ${obj.message}]`;
32
+ if (obj instanceof Map) {
33
+ if (depth <= 0) return `Map(${obj.size}) { ... }`;
34
+ const entries2 = [...obj.entries()].slice(0, MAX_ARRAY_LENGTH).map(([k, v]) => `${inspectInner(k, depth - 1, seen)} => ${inspectInner(v, depth - 1, seen)}`);
35
+ const suffix2 = obj.size > MAX_ARRAY_LENGTH ? ", ..." : "";
36
+ return `Map(${obj.size}) { ${entries2.join(", ")}${suffix2} }`;
37
+ }
38
+ if (obj instanceof Set) {
39
+ if (depth <= 0) return `Set(${obj.size}) { ... }`;
40
+ const entries2 = [...obj.values()].slice(0, MAX_ARRAY_LENGTH).map((v) => inspectInner(v, depth - 1, seen));
41
+ const suffix2 = obj.size > MAX_ARRAY_LENGTH ? ", ..." : "";
42
+ return `Set(${obj.size}) { ${entries2.join(", ")}${suffix2} }`;
43
+ }
44
+ if (ArrayBuffer.isView(obj)) {
45
+ const typedName = obj.constructor.name;
46
+ const arr = obj instanceof DataView ? new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength) : obj;
47
+ const len = "length" in arr ? arr.length : 0;
48
+ const shown = Math.min(len, MAX_ARRAY_LENGTH);
49
+ const items = [];
50
+ for (let i = 0; i < shown; i++) items.push(String(arr[i]));
51
+ const suffix2 = len > MAX_ARRAY_LENGTH ? ", ..." : "";
52
+ return `${typedName}(${len}) [ ${items.join(", ")}${suffix2} ]`;
53
+ }
54
+ if (Array.isArray(obj)) {
55
+ if (depth <= 0) return `[ ... ]`;
56
+ const shown = obj.slice(0, MAX_ARRAY_LENGTH).map((v) => inspectInner(v, depth - 1, seen));
57
+ const suffix2 = obj.length > MAX_ARRAY_LENGTH ? ", ..." : "";
58
+ return `[ ${shown.join(", ")}${suffix2} ]`;
59
+ }
60
+ if (depth <= 0) return "{ ... }";
61
+ const keys = Object.keys(obj);
62
+ const entries = keys.slice(0, MAX_ARRAY_LENGTH).map((k) => `${k}: ${inspectInner(obj[k], depth - 1, seen)}`);
63
+ const suffix = keys.length > MAX_ARRAY_LENGTH ? ", ..." : "";
64
+ const prefix = obj.constructor && obj.constructor.name !== "Object" ? `${obj.constructor.name} ` : "";
65
+ return `${prefix}{ ${entries.join(", ")}${suffix} }`;
66
+ }
67
+ function inspectInner(value, depth, seen) {
68
+ if (value === null) return "null";
69
+ if (value === void 0) return "undefined";
70
+ if (typeof value === "object") return inspectObject(value, depth, seen);
71
+ return safeInspect(value, depth);
72
+ }
73
+ export {
74
+ safeInspect
75
+ };
@@ -1,6 +1,43 @@
1
- export * from "@gjsify/deno_std/node/assert/strict";
2
- import assert from "@gjsify/deno_std/node/assert/strict";
3
- var strict_default = assert;
1
+ import { strict, strict as strict2 } from "../index.js";
2
+ import {
3
+ AssertionError,
4
+ ok,
5
+ fail,
6
+ ifError,
7
+ match,
8
+ doesNotMatch,
9
+ throws,
10
+ doesNotThrow,
11
+ rejects,
12
+ doesNotReject,
13
+ strictEqual,
14
+ notStrictEqual,
15
+ deepStrictEqual,
16
+ notDeepStrictEqual,
17
+ strictEqual as strictEqual2,
18
+ notStrictEqual as notStrictEqual2,
19
+ deepStrictEqual as deepStrictEqual2,
20
+ notDeepStrictEqual as notDeepStrictEqual2
21
+ } from "../index.js";
4
22
  export {
5
- strict_default as default
23
+ AssertionError,
24
+ deepStrictEqual2 as deepEqual,
25
+ deepStrictEqual,
26
+ strict as default,
27
+ doesNotMatch,
28
+ doesNotReject,
29
+ doesNotThrow,
30
+ strictEqual2 as equal,
31
+ fail,
32
+ ifError,
33
+ match,
34
+ notDeepStrictEqual2 as notDeepEqual,
35
+ notDeepStrictEqual,
36
+ notStrictEqual2 as notEqual,
37
+ notStrictEqual,
38
+ ok,
39
+ rejects,
40
+ strict2 as strict,
41
+ strictEqual,
42
+ throws
6
43
  };
@@ -0,0 +1,17 @@
1
+ interface AssertionErrorOptions {
2
+ actual?: unknown;
3
+ expected?: unknown;
4
+ message?: string | Error;
5
+ operator?: string;
6
+ stackStartFn?: Function;
7
+ }
8
+ export declare class AssertionError extends Error {
9
+ actual: unknown;
10
+ expected: unknown;
11
+ operator: string;
12
+ code: string;
13
+ generatedMessage: boolean;
14
+ constructor(options: AssertionErrorOptions);
15
+ toString(): string;
16
+ }
17
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function isDeepEqual(val1: unknown, val2: unknown): boolean;
2
+ export declare function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
@@ -0,0 +1,45 @@
1
+ import { AssertionError } from './assertion-error.js';
2
+ export { AssertionError };
3
+ declare function ok(value: unknown, message?: string | Error): void;
4
+ declare function equal(actual: unknown, expected: unknown, message?: string | Error): void;
5
+ declare function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
6
+ declare function strictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
7
+ declare function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
8
+ declare function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
9
+ declare function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
10
+ declare function deepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
11
+ declare function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
12
+ type ErrorPredicate = RegExp | Function | ((err: unknown) => boolean) | object | Error;
13
+ declare function throws(fn: () => unknown, errorOrMessage?: ErrorPredicate | string, message?: string | Error): void;
14
+ declare function doesNotThrow(fn: () => unknown, errorOrMessage?: ErrorPredicate | string, message?: string | Error): void;
15
+ declare function rejects(asyncFn: (() => Promise<unknown>) | Promise<unknown>, errorOrMessage?: ErrorPredicate | string, message?: string | Error): Promise<void>;
16
+ declare function doesNotReject(asyncFn: (() => Promise<unknown>) | Promise<unknown>, errorOrMessage?: ErrorPredicate | string, message?: string | Error): Promise<void>;
17
+ declare function fail(message?: string | Error): never;
18
+ declare function fail(actual: unknown, expected: unknown, message?: string | Error, operator?: string, stackStartFn?: Function): never;
19
+ declare function ifError(value: unknown): void;
20
+ declare function match(actual: string, expected: RegExp, message?: string | Error): void;
21
+ declare function doesNotMatch(actual: string, expected: RegExp, message?: string | Error): void;
22
+ declare const strict: any;
23
+ declare const assert: ((value: unknown, message?: string | Error) => void) & {
24
+ AssertionError: typeof AssertionError;
25
+ ok: typeof ok;
26
+ equal: typeof equal;
27
+ notEqual: typeof notEqual;
28
+ strictEqual: typeof strictEqual;
29
+ notStrictEqual: typeof notStrictEqual;
30
+ deepEqual: typeof deepEqual;
31
+ notDeepEqual: typeof notDeepEqual;
32
+ deepStrictEqual: typeof deepStrictEqual;
33
+ notDeepStrictEqual: typeof notDeepStrictEqual;
34
+ throws: typeof throws;
35
+ doesNotThrow: typeof doesNotThrow;
36
+ rejects: typeof rejects;
37
+ doesNotReject: typeof doesNotReject;
38
+ fail: typeof fail;
39
+ ifError: typeof ifError;
40
+ match: typeof match;
41
+ doesNotMatch: typeof doesNotMatch;
42
+ strict: any;
43
+ };
44
+ export { ok, equal, notEqual, strictEqual, notStrictEqual, deepEqual, notDeepEqual, deepStrictEqual, notDeepStrictEqual, throws, doesNotThrow, rejects, doesNotReject, fail, ifError, match, doesNotMatch, strict, };
45
+ export default assert;
@@ -0,0 +1 @@
1
+ export declare function safeInspect(value: unknown, depth?: number): string;
@@ -0,0 +1,2 @@
1
+ export { strict as default, strict } from '../index.js';
2
+ export { AssertionError, ok, fail, ifError, match, doesNotMatch, throws, doesNotThrow, rejects, doesNotReject, strictEqual, notStrictEqual, deepStrictEqual, notDeepStrictEqual, strictEqual as equal, notStrictEqual as notEqual, deepStrictEqual as deepEqual, notDeepStrictEqual as notDeepEqual, } from '../index.js';