@kensio/smartass 0.1.10 → 1.0.1

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/README.md CHANGED
@@ -38,7 +38,7 @@ npm install @kensio/smartass
38
38
 
39
39
  ## Assertion functions
40
40
 
41
- - [assertArrayEqual](src/assert/array-equal/array-equal.assert.ts)
41
+ - [assertArrayEquals](src/assert/array-equals/array-equals.assert.ts)
42
42
  - [assertArrayIncludes](src/assert/array-includes/array-includes.assert.ts)
43
43
  - [assertArrayIncludesAll](src/assert/array-includes-all/array-includes-all.assert.ts)
44
44
  - [assertArrayLength](src/assert/array-length/array-length.assert.ts)
@@ -51,9 +51,11 @@ npm install @kensio/smartass
51
51
  - [assertNonNullable](src/assert/non-nullable/non-nullable.assert.ts)
52
52
  - [assertNumberBetween](src/assert/number-between/number-between.assert.ts)
53
53
  - [assertNumberToNearest](src/assert/number-to-nearest/number-to-nearest.assert.ts)
54
+ - [assertObjectMatches](src/assert/object-matches/object-matches.assert.ts)
54
55
  - [assertOneOf](src/assert/one-of/one-of.assert.ts)
55
56
  - [assertStringEndsWith](src/assert/string-ends-with/string-ends-with.assert.ts)
56
57
  - [assertStringIncludes](src/assert/string-includes/string-includes.assert.ts)
58
+ - [assertStringNotIncludes](src/assert/string-not-includes/string-not-includes.assert.ts)
57
59
  - [assertStringStartsWith](src/assert/string-starts-with/string-starts-with.assert.ts)
58
60
  - [assertThrowsError](src/assert/throws-error/throws-error.assert.ts)
59
61
  - [assertThrowsErrorAsync](src/assert/throws-error-async/throws-error-async.assert.ts)
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Assert that two arrays have the same length and the same elements in the same
3
+ * positions, with type narrowing.
4
+ *
5
+ * Elements are compared using Object.is; nested arrays and objects must be the
6
+ * same references.
7
+ */
8
+ export declare function assertArrayEquals<const TExpected extends readonly unknown[]>(actual: unknown, expected: TExpected, message?: string): asserts actual is TExpected;
9
+ //# sourceMappingURL=array-equals.assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-equals.assert.d.ts","sourceRoot":"","sources":["../../../src/assert/array-equals/array-equals.assert.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,SAAS,SAAS,SAAS,OAAO,EAAE,EAC1E,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,IAAI,SAAS,CAQ7B"}
@@ -0,0 +1,19 @@
1
+ import { AssertionError } from "../../assertion-error.js";
2
+ import { desc } from "../../describe/describe.js";
3
+ /**
4
+ * Assert that two arrays have the same length and the same elements in the same
5
+ * positions, with type narrowing.
6
+ *
7
+ * Elements are compared using Object.is; nested arrays and objects must be the
8
+ * same references.
9
+ */
10
+ export function assertArrayEquals(actual, expected, message) {
11
+ if (!Array.isArray(actual) || !arraysEqual(actual, expected)) {
12
+ throw new AssertionError(message ?? `Expected ${desc(actual)} to equal ${desc(expected)}.`, actual, expected);
13
+ }
14
+ }
15
+ function arraysEqual(actual, expected) {
16
+ return (actual.length === expected.length &&
17
+ actual.every((element, index) => Object.is(element, expected[index])));
18
+ }
19
+ //# sourceMappingURL=array-equals.assert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-equals.assert.js","sourceRoot":"","sources":["../../../src/assert/array-equals/array-equals.assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAe,EACf,QAAmB,EACnB,OAAgB;IAEhB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,cAAc,CACtB,OAAO,IAAI,YAAY,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,GAAG,EACjE,MAAM,EACN,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAClB,MAA0B,EAC1B,QAA4B;IAE5B,OAAO,CACL,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QACjC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CACtE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ type FunctionLike = (...arguments_: never[]) => unknown;
2
+ type ObjectMatchLeaf = FunctionLike | Date | RegExp | Map<unknown, unknown> | Set<unknown> | WeakMap<object, unknown> | WeakSet<object> | Promise<unknown>;
3
+ type DeepObjectMatch<T> = T extends ObjectMatchLeaf ? T : T extends readonly unknown[] ? {
4
+ readonly [K in keyof T]: DeepObjectMatch<T[K]>;
5
+ } : T extends object ? {
6
+ [K in keyof T]: DeepObjectMatch<T[K]>;
7
+ } : T;
8
+ /**
9
+ * Assert that an object matches a partial deep object structure, with
10
+ * type-narrowing.
11
+ *
12
+ * Plain objects are matched partially and recursively. Arrays are matched by
13
+ * length and by recursively matching each element in order. Primitive values and
14
+ * non-plain objects are compared using Object.is.
15
+ */
16
+ export declare function assertObjectMatches<TActual, const TExpected extends Record<PropertyKey, unknown>>(actual: TActual, expected: TExpected, message?: string): asserts actual is TActual & DeepObjectMatch<TExpected>;
17
+ export {};
18
+ //# sourceMappingURL=object-matches.assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-matches.assert.d.ts","sourceRoot":"","sources":["../../../src/assert/object-matches/object-matches.assert.ts"],"names":[],"mappings":"AAGA,KAAK,YAAY,GAAG,CAAC,GAAG,UAAU,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC;AAExD,KAAK,eAAe,GAChB,YAAY,GACZ,IAAI,GACJ,MAAM,GACN,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,GACrB,GAAG,CAAC,OAAO,CAAC,GACZ,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GACxB,OAAO,CAAC,MAAM,CAAC,GACf,OAAO,CAAC,OAAO,CAAC,CAAC;AAErB,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,eAAe,GAC/C,CAAC,GACD,CAAC,SAAS,SAAS,OAAO,EAAE,GAC1B;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAClD,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACzC,CAAC,CAAC;AAEV;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EACP,KAAK,CAAC,SAAS,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAEpD,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,IAAI,OAAO,GAAG,eAAe,CAAC,SAAS,CAAC,CAWxD"}
@@ -0,0 +1,97 @@
1
+ import { AssertionError } from "../../assertion-error.js";
2
+ import { desc, repr } from "../../describe/describe.js";
3
+ /**
4
+ * Assert that an object matches a partial deep object structure, with
5
+ * type-narrowing.
6
+ *
7
+ * Plain objects are matched partially and recursively. Arrays are matched by
8
+ * length and by recursively matching each element in order. Primitive values and
9
+ * non-plain objects are compared using Object.is.
10
+ */
11
+ export function assertObjectMatches(actual, expected, message) {
12
+ const mismatch = findMismatch(actual, expected, "$");
13
+ if (mismatch !== undefined) {
14
+ throw new AssertionError(message ??
15
+ `Expected ${desc(actual)} to match ${desc(expected)}. Mismatch at ${mismatch.path}: expected ${repr(mismatch.expected)}, got ${repr(mismatch.actual)}.`, actual, expected);
16
+ }
17
+ }
18
+ function findMismatch(actual, expected, path) {
19
+ if (Array.isArray(expected)) {
20
+ return findArrayMismatch(actual, expected, path);
21
+ }
22
+ if (isPlainObject(expected)) {
23
+ return findObjectMismatch(actual, expected, path);
24
+ }
25
+ if (!Object.is(actual, expected)) {
26
+ return {
27
+ path,
28
+ actual,
29
+ expected,
30
+ };
31
+ }
32
+ return undefined;
33
+ }
34
+ function findArrayMismatch(actual, expected, path) {
35
+ if (!Array.isArray(actual)) {
36
+ return {
37
+ path,
38
+ actual,
39
+ expected,
40
+ };
41
+ }
42
+ if (actual.length !== expected.length) {
43
+ return {
44
+ path: `${path}.length`,
45
+ actual: actual.length,
46
+ expected: expected.length,
47
+ };
48
+ }
49
+ for (const [index, expectedElement] of expected.entries()) {
50
+ const mismatch = findMismatch(actual[index], expectedElement, `${path}[${String(index)}]`);
51
+ if (mismatch !== undefined) {
52
+ return mismatch;
53
+ }
54
+ }
55
+ return undefined;
56
+ }
57
+ function findObjectMismatch(actual, expected, path) {
58
+ if (actual === null || typeof actual !== "object" || Array.isArray(actual)) {
59
+ return {
60
+ path,
61
+ actual,
62
+ expected,
63
+ };
64
+ }
65
+ const actualObject = actual;
66
+ for (const key of Reflect.ownKeys(expected)) {
67
+ if (!Object.hasOwn(actualObject, key)) {
68
+ return {
69
+ path: formatPath(path, key),
70
+ actual: undefined,
71
+ expected: expected[key],
72
+ };
73
+ }
74
+ const mismatch = findMismatch(actualObject[key], expected[key], formatPath(path, key));
75
+ if (mismatch !== undefined) {
76
+ return mismatch;
77
+ }
78
+ }
79
+ return undefined;
80
+ }
81
+ function isPlainObject(value) {
82
+ if (value === null || typeof value !== "object") {
83
+ return false;
84
+ }
85
+ const prototype = Object.getPrototypeOf(value);
86
+ return prototype === Object.prototype || prototype === null;
87
+ }
88
+ function formatPath(parent, key) {
89
+ if (typeof key === "string" && /^[$A-Z_a-z][\w$]*$/.test(key)) {
90
+ return `${parent}.${key}`;
91
+ }
92
+ if (typeof key === "symbol") {
93
+ return `${parent}[${key.toString()}]`;
94
+ }
95
+ return `${parent}[${repr(key)}]`;
96
+ }
97
+ //# sourceMappingURL=object-matches.assert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-matches.assert.js","sourceRoot":"","sources":["../../../src/assert/object-matches/object-matches.assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAsBxD;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAIjC,MAAe,EACf,QAAmB,EACnB,OAAgB;IAEhB,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAErD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,cAAc,CACtB,OAAO;YACL,YAAY,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,iBAAiB,QAAQ,CAAC,IAAI,cAAc,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EACzJ,MAAM,EACN,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC;AAQD,SAAS,YAAY,CACnB,MAAe,EACf,QAAiB,EACjB,IAAY;IAEZ,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,EAAE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,CAAC;AACnC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Assert that a string does not include a given substring, with type narrowing.
3
+ */
4
+ export declare function assertStringNotIncludes<const T extends string>(value: string, substring: T, message?: string): asserts value is Exclude<string, `${string}${T}${string}`>;
5
+ //# sourceMappingURL=string-not-includes.assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-not-includes.assert.d.ts","sourceRoot":"","sources":["../../../src/assert/string-not-includes/string-not-includes.assert.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EAC5D,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,CAAC,EACZ,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,CAS5D"}
@@ -0,0 +1,12 @@
1
+ import { AssertionError } from "../../assertion-error.js";
2
+ import { desc, repr } from "../../describe/describe.js";
3
+ /**
4
+ * Assert that a string does not include a given substring, with type narrowing.
5
+ */
6
+ export function assertStringNotIncludes(value, substring, message) {
7
+ if (value.includes(substring)) {
8
+ throw new AssertionError(message ??
9
+ `Expected ${desc(value)} not to include ${repr(substring)}, but it did.`, value, `string not including ${repr(substring)}`);
10
+ }
11
+ }
12
+ //# sourceMappingURL=string-not-includes.assert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-not-includes.assert.js","sourceRoot":"","sources":["../../../src/assert/string-not-includes/string-not-includes.assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAExD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAa,EACb,SAAY,EACZ,OAAgB;IAEhB,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,cAAc,CACtB,OAAO;YACL,YAAY,IAAI,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,eAAe,EAC1E,KAAK,EACL,wBAAwB,IAAI,CAAC,SAAS,CAAC,EAAE,CAC1C,CAAC;IACJ,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./assert/array-equal/array-equal.assert.js";
1
+ export * from "./assert/array-equals/array-equals.assert.js";
2
2
  export * from "./assert/array-includes-all/array-includes-all.assert.js";
3
3
  export * from "./assert/array-includes/array-includes.assert.js";
4
4
  export * from "./assert/array-length/array-length.assert.js";
@@ -11,9 +11,11 @@ export * from "./assert/instance-of/instance-of.assert.js";
11
11
  export * from "./assert/non-nullable/non-nullable.assert.js";
12
12
  export * from "./assert/number-between/number-between.assert.js";
13
13
  export * from "./assert/number-to-nearest/number-to-nearest.assert.js";
14
+ export * from "./assert/object-matches/object-matches.assert.js";
14
15
  export * from "./assert/one-of/one-of.assert.js";
15
16
  export * from "./assert/string-ends-with/string-ends-with.assert.js";
16
17
  export * from "./assert/string-includes/string-includes.assert.js";
18
+ export * from "./assert/string-not-includes/string-not-includes.assert.js";
17
19
  export * from "./assert/string-starts-with/string-starts-with.assert.js";
18
20
  export * from "./assert/throws-error-async/throws-error-async.assert.js";
19
21
  export * from "./assert/throws-error/throws-error.assert.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0DAA0D,CAAC;AACzE,cAAc,kDAAkD,CAAC;AACjE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,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CAA8C,CAAC;AAC7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sDAAsD,CAAC;AACrE,cAAc,iCAAiC,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./assert/array-equal/array-equal.assert.js";
1
+ export * from "./assert/array-equals/array-equals.assert.js";
2
2
  export * from "./assert/array-includes-all/array-includes-all.assert.js";
3
3
  export * from "./assert/array-includes/array-includes.assert.js";
4
4
  export * from "./assert/array-length/array-length.assert.js";
@@ -11,9 +11,11 @@ export * from "./assert/instance-of/instance-of.assert.js";
11
11
  export * from "./assert/non-nullable/non-nullable.assert.js";
12
12
  export * from "./assert/number-between/number-between.assert.js";
13
13
  export * from "./assert/number-to-nearest/number-to-nearest.assert.js";
14
+ export * from "./assert/object-matches/object-matches.assert.js";
14
15
  export * from "./assert/one-of/one-of.assert.js";
15
16
  export * from "./assert/string-ends-with/string-ends-with.assert.js";
16
17
  export * from "./assert/string-includes/string-includes.assert.js";
18
+ export * from "./assert/string-not-includes/string-not-includes.assert.js";
17
19
  export * from "./assert/string-starts-with/string-starts-with.assert.js";
18
20
  export * from "./assert/throws-error-async/throws-error-async.assert.js";
19
21
  export * from "./assert/throws-error/throws-error.assert.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0DAA0D,CAAC;AACzE,cAAc,kDAAkD,CAAC;AACjE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAA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C7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sDAAsD,CAAC;AACrE,cAAc,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Kensio Software",
5
5
  "repository": "https://github.com/KensioSoftware/smartass",
6
6
  "license": "AGPL-3.0",
7
- "version": "0.1.10",
7
+ "version": "1.0.1",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -15,7 +15,9 @@
15
15
  }
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "README.md",
20
+ "LICENSE"
19
21
  ],
20
22
  "publishConfig": {
21
23
  "access": "public"