@xylabs/vitest-matchers 6.1.4 → 7.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.
- package/dist/neutral/index.mjs +32 -32
- package/dist/neutral/index.mjs.map +2 -2
- package/package.json +5 -5
package/dist/neutral/index.mjs
CHANGED
|
@@ -6,8 +6,8 @@ var formatValue = (value) => {
|
|
|
6
6
|
return json ?? String(value);
|
|
7
7
|
};
|
|
8
8
|
function toBeType(received, expectedType) {
|
|
9
|
-
const
|
|
10
|
-
return
|
|
9
|
+
const isPass = typeof received === expectedType && !Number.isNaN(received);
|
|
10
|
+
return isPass ? {
|
|
11
11
|
message: () => `expected ${formatValue(received)} not to be a ${expectedType}`,
|
|
12
12
|
pass: true
|
|
13
13
|
} : {
|
|
@@ -22,8 +22,8 @@ var matchers = {
|
|
|
22
22
|
* @param expectedSize - The expected array length.
|
|
23
23
|
*/
|
|
24
24
|
toBeArrayOfSize(received, expectedSize) {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const isPass = Array.isArray(received) && received.length === expectedSize;
|
|
26
|
+
return isPass ? {
|
|
27
27
|
message: () => `expected array not to have size ${expectedSize}, but received array of size ${received.length}`,
|
|
28
28
|
pass: true
|
|
29
29
|
} : {
|
|
@@ -36,8 +36,8 @@ var matchers = {
|
|
|
36
36
|
* @param received - The value to check.
|
|
37
37
|
*/
|
|
38
38
|
toBeArray(received) {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const isPass = Array.isArray(received);
|
|
40
|
+
return isPass ? {
|
|
41
41
|
message: () => "expected array",
|
|
42
42
|
pass: true
|
|
43
43
|
} : {
|
|
@@ -51,8 +51,8 @@ var matchers = {
|
|
|
51
51
|
* @param expected - The array of acceptable values.
|
|
52
52
|
*/
|
|
53
53
|
toBeOneOf(received, expected) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
54
|
+
const isPass = expected.includes(received);
|
|
55
|
+
return isPass ? {
|
|
56
56
|
pass: true,
|
|
57
57
|
message: () => `expected ${formatValue(received)} not to be one of ${JSON.stringify(expected)}`
|
|
58
58
|
} : {
|
|
@@ -68,8 +68,8 @@ var matchers = {
|
|
|
68
68
|
if (typeof received !== "number") {
|
|
69
69
|
throw new TypeError(`Expected a number, but received ${typeof received}`);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
return
|
|
71
|
+
const isPass = received < 0;
|
|
72
|
+
return isPass ? {
|
|
73
73
|
pass: true,
|
|
74
74
|
message: () => `expected ${received} not to be negative`
|
|
75
75
|
} : {
|
|
@@ -85,8 +85,8 @@ var matchers = {
|
|
|
85
85
|
if (typeof received !== "number") {
|
|
86
86
|
throw new TypeError(`Expected a number, but received ${typeof received}`);
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
return
|
|
88
|
+
const isPass = received > 0;
|
|
89
|
+
return isPass ? {
|
|
90
90
|
pass: true,
|
|
91
91
|
message: () => `expected ${received} not to be positive`
|
|
92
92
|
} : {
|
|
@@ -114,8 +114,8 @@ var matchers = {
|
|
|
114
114
|
* @param received - The value to check.
|
|
115
115
|
*/
|
|
116
116
|
toBeObject(received) {
|
|
117
|
-
const
|
|
118
|
-
return
|
|
117
|
+
const isPass = typeof received === "object" && !Array.isArray(received) && received !== null;
|
|
118
|
+
return isPass ? {
|
|
119
119
|
message: () => `expected ${formatValue(received)} to be object`,
|
|
120
120
|
pass: true
|
|
121
121
|
} : {
|
|
@@ -131,8 +131,8 @@ var matchers = {
|
|
|
131
131
|
if (typeof received !== "number") {
|
|
132
132
|
throw new TypeError(`Expected a number, but received ${typeof received}`);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
return
|
|
134
|
+
const isPass = Number.isSafeInteger(received);
|
|
135
|
+
return isPass ? {
|
|
136
136
|
pass: true,
|
|
137
137
|
message: () => `expected ${received} not to be an integer`
|
|
138
138
|
} : {
|
|
@@ -145,8 +145,8 @@ var matchers = {
|
|
|
145
145
|
* @param received - The value to check.
|
|
146
146
|
*/
|
|
147
147
|
toBeFalse(received) {
|
|
148
|
-
const
|
|
149
|
-
return
|
|
148
|
+
const isPass = received === false;
|
|
149
|
+
return isPass ? {
|
|
150
150
|
message: () => `expected ${formatValue(received)} to be false`,
|
|
151
151
|
pass: true
|
|
152
152
|
} : {
|
|
@@ -159,8 +159,8 @@ var matchers = {
|
|
|
159
159
|
* @param received - The value to check.
|
|
160
160
|
*/
|
|
161
161
|
toBeTrue(received) {
|
|
162
|
-
const
|
|
163
|
-
return
|
|
162
|
+
const isPass = received === true;
|
|
163
|
+
return isPass ? {
|
|
164
164
|
message: () => `expected ${formatValue(received)} to be true`,
|
|
165
165
|
pass: true
|
|
166
166
|
} : {
|
|
@@ -185,10 +185,10 @@ var matchers = {
|
|
|
185
185
|
message: () => `Expected an array or object, but received ${typeof received}.`
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const isPass = expectedValues.every((value) => receivedValues.includes(value));
|
|
189
189
|
return {
|
|
190
|
-
pass,
|
|
191
|
-
message: () =>
|
|
190
|
+
pass: isPass,
|
|
191
|
+
message: () => isPass ? `Expected ${JSON.stringify(received)} not to contain all values ${JSON.stringify(expectedValues)}, but it does.` : `Expected ${JSON.stringify(received)} to contain all values ${JSON.stringify(expectedValues)}, but it does not.`
|
|
192
192
|
};
|
|
193
193
|
},
|
|
194
194
|
/**
|
|
@@ -197,8 +197,8 @@ var matchers = {
|
|
|
197
197
|
* @param key - The key that should be present.
|
|
198
198
|
*/
|
|
199
199
|
toContainKey(received, key) {
|
|
200
|
-
const
|
|
201
|
-
return
|
|
200
|
+
const isPass = Object.prototype.hasOwnProperty.call(received, key);
|
|
201
|
+
return isPass ? {
|
|
202
202
|
pass: true,
|
|
203
203
|
message: () => `Expected object not to contain key "${key}", but it does.`
|
|
204
204
|
} : {
|
|
@@ -212,19 +212,19 @@ var matchers = {
|
|
|
212
212
|
* @param value - The value to look for.
|
|
213
213
|
*/
|
|
214
214
|
toInclude(received, value) {
|
|
215
|
-
let
|
|
215
|
+
let isPass;
|
|
216
216
|
if (Array.isArray(received)) {
|
|
217
|
-
|
|
217
|
+
isPass = received.includes(value);
|
|
218
218
|
} else if (typeof received === "string") {
|
|
219
|
-
|
|
219
|
+
isPass = received.includes(String(value));
|
|
220
220
|
} else if (typeof received === "object" && received !== null) {
|
|
221
|
-
|
|
221
|
+
isPass = Object.values(received).includes(value);
|
|
222
222
|
} else {
|
|
223
|
-
|
|
223
|
+
isPass = false;
|
|
224
224
|
}
|
|
225
225
|
return {
|
|
226
|
-
pass,
|
|
227
|
-
message: () =>
|
|
226
|
+
pass: isPass,
|
|
227
|
+
message: () => isPass ? `Expected ${JSON.stringify(received)} not to include ${JSON.stringify(value)}, but it does.` : `Expected ${JSON.stringify(received)} to include ${JSON.stringify(value)}, but it does not.`
|
|
228
228
|
};
|
|
229
229
|
},
|
|
230
230
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/customMatchers.ts"],
|
|
4
|
-
"sourcesContent": ["/** Result returned by a custom matcher function. */\nexport interface ExpectationResult {\n /** The actual value received by the matcher. */\n actual?: unknown\n /** The expected value the matcher compared against. */\n expected?: unknown\n /** Returns a human-readable failure or negation message. */\n message: () => string\n /** Whether the matcher assertion passed. */\n pass: boolean\n}\n\nconst formatValue = (value: unknown): string => {\n if (typeof value === 'string') return value\n if (typeof value === 'number' && !Number.isFinite(value)) return String(value)\n const json = JSON.stringify(value)\n return json ?? String(value)\n}\n\n/**\n * Checks whether the received value matches the expected JavaScript type and is not NaN.\n * @param received - The value to check.\n * @param expectedType - The expected `typeof` string (e.g. 'number', 'string').\n * @returns An ExpectationResult indicating pass or fail.\n */\nfunction toBeType(received: unknown, expectedType: string): ExpectationResult {\n const pass = typeof received === expectedType && !Number.isNaN(received)\n return pass\n ? {\n message: () => `expected ${formatValue(received)} not to be a ${expectedType}`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be a ${expectedType}`,\n pass: false,\n }\n}\n\n/** Collection of custom Vitest matchers extending the built-in `expect` assertions. */\nexport const matchers = {\n /**\n * Asserts the received value is an array with the specified length.\n * @param received - The value to check.\n * @param expectedSize - The expected array length.\n */\n toBeArrayOfSize(received: unknown, expectedSize: number): ExpectationResult {\n const pass = Array.isArray(received) && received.length === expectedSize\n return pass\n ? {\n message: () => `expected array not to have size ${expectedSize}, but received array of size ${received.length}`,\n pass: true,\n }\n : {\n message: () => Array.isArray(received)\n ? `expected array of size ${expectedSize}, but received array of size ${received.length}`\n : `expected array of size ${expectedSize}, but received a non-array`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is an array.\n * @param received - The value to check.\n */\n toBeArray(received: unknown): ExpectationResult {\n const pass = Array.isArray(received)\n return pass\n ? {\n message: () => 'expected array',\n pass: true,\n }\n : {\n message: () => `expected array, but received ${typeof received}`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is one of the values in the expected array.\n * @param received - The value to check.\n * @param expected - The array of acceptable values.\n */\n toBeOneOf(received: unknown, expected: unknown[]): ExpectationResult {\n const pass = expected.includes(received)\n return pass\n ? {\n pass: true,\n message: () =>\n `expected ${formatValue(received)} not to be one of ${JSON.stringify(expected)}`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${formatValue(received)} to be one of ${JSON.stringify(expected)}`,\n }\n },\n /**\n * Asserts the received number is negative (less than zero).\n * @param received - The number to check.\n */\n toBeNegative(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const pass = received < 0\n return pass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be negative`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be negative`,\n }\n },\n /**\n * Asserts the received number is positive (greater than zero).\n * @param received - The number to check.\n */\n toBePositive(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const pass = received > 0\n return pass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be positive`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be positive`,\n }\n },\n /**\n * Asserts the received value is of type `number` and not NaN.\n * @param received - The value to check.\n */\n toBeNumber: (received: unknown) => toBeType(received, 'number'),\n /**\n * Asserts the received value is of type `function`.\n * @param received - The value to check.\n */\n toBeFunction: (received: unknown) => toBeType(received, 'function'),\n /**\n * Asserts the received value is of type `string`.\n * @param received - The value to check.\n */\n toBeString: (received: unknown) => toBeType(received, 'string'),\n /**\n * Asserts the received value is a plain object (not an array or null).\n * @param received - The value to check.\n */\n toBeObject(received: unknown): ExpectationResult {\n const pass = typeof received === 'object' && !Array.isArray(received) && received !== null\n return pass\n ? {\n message: () => `expected ${formatValue(received)} to be object`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be an object but was ${Array.isArray(received) ? 'array' : typeof received}`,\n pass: false,\n }\n },\n /**\n * Asserts the received number is an integer.\n * @param received - The number to check.\n */\n toBeInteger(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const pass = Number.isSafeInteger(received)\n return pass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be an integer`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be an integer`,\n }\n },\n /**\n * Asserts the received value is strictly `false`.\n * @param received - The value to check.\n */\n toBeFalse(received: unknown): ExpectationResult {\n const pass = received === false\n return pass\n ? {\n message: () => `expected ${formatValue(received)} to be false`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be false but was not false`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is strictly `true`.\n * @param received - The value to check.\n */\n toBeTrue(received: unknown): ExpectationResult {\n const pass = received === true\n return pass\n ? {\n message: () => `expected ${formatValue(received)} to be true`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be true but was not true`,\n pass: false,\n }\n },\n /**\n * Asserts that all expected values are present in the received array or object values.\n * @param received - The array or object to check.\n * @param expectedValues - The values that must all be present.\n */\n toContainAllValues(received: unknown, expectedValues: unknown[]) {\n let receivedValues: unknown[]\n\n // Check if received is an array or an object\n if (Array.isArray(received)) {\n receivedValues = received\n } else if (typeof received === 'object' && received !== null) {\n receivedValues = Object.values(received)\n } else {\n return {\n pass: false,\n message: () => `Expected an array or object, but received ${typeof received}.`,\n }\n }\n\n // Check if all expected values are in the received values\n const pass = expectedValues.every(value => receivedValues.includes(value))\n\n return {\n pass,\n message: () =>\n pass\n ? `Expected ${JSON.stringify(received)} not to contain all values ${JSON.stringify(expectedValues)}, but it does.`\n : `Expected ${JSON.stringify(received)} to contain all values ${JSON.stringify(expectedValues)}, but it does not.`,\n }\n },\n /**\n * Asserts that the received object contains the specified key.\n * @param received - The object to check.\n * @param key - The key that should be present.\n */\n toContainKey(received: object, key: string) {\n const pass = Object.prototype.hasOwnProperty.call(received, key)\n return pass\n ? {\n pass: true,\n message: () => `Expected object not to contain key \"${key}\", but it does.`,\n }\n : {\n pass: false,\n message: () => `Expected object to contain key \"${key}\", but it does not.`,\n }\n },\n /**\n * Asserts that the received array, string, or object values include the specified value.\n * @param received - The array, string, or object to search within.\n * @param value - The value to look for.\n */\n toInclude(received: unknown, value: unknown) {\n let pass: boolean\n\n if (Array.isArray(received)) {\n pass = received.includes(value)\n } else if (typeof received === 'string') {\n pass = received.includes(String(value))\n } else if (typeof received === 'object' && received !== null) {\n pass = Object.values(received).includes(value)\n } else {\n pass = false\n }\n\n return {\n pass,\n message: () =>\n pass\n ? `Expected ${JSON.stringify(received)} not to include ${JSON.stringify(value)}, but it does.`\n : `Expected ${JSON.stringify(received)} to include ${JSON.stringify(value)}, but it does not.`,\n }\n },\n /**\n * Asserts that the received array includes all members of the expected array.\n * @param received - The array to check.\n * @param expected - The members that must all be present.\n */\n toIncludeAllMembers(received: unknown[], expected: unknown[]): ExpectationResult {\n if (!Array.isArray(received) || !Array.isArray(expected)) {\n return {\n pass: false,\n message: () => 'Expected both received and expected values to be arrays.',\n }\n }\n\n const missingMembers = expected.filter(item => !received.includes(item))\n\n return missingMembers.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected array not to include all members of ${JSON.stringify(expected)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected array to include all members of ${JSON.stringify(expected)}. Missing members: ${JSON.stringify(\n missingMembers,\n )}.`,\n }\n },\n /**\n * Asserts that the received object contains all of the specified keys.\n * @param received - The object to check.\n * @param expectedKeys - The keys that must all be present.\n */\n toContainAllKeys(received: object, expectedKeys: string[]): ExpectationResult {\n if (typeof received !== 'object' || received === null) {\n return {\n pass: false,\n message: () => `Expected ${JSON.stringify(received)} to be an object.`,\n }\n }\n\n if (!Array.isArray(expectedKeys)) {\n return {\n pass: false,\n message: () => `Expected keys to be an array, but received ${JSON.stringify(expectedKeys)}.`,\n }\n }\n\n const missingKeys = expectedKeys.filter(key => !Object.hasOwn(received, key))\n\n return missingKeys.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected object not to contain all keys ${JSON.stringify(expectedKeys)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected object to contain all keys ${JSON.stringify(expectedKeys)}. Missing keys: ${JSON.stringify(\n missingKeys,\n )}.`,\n }\n },\n /**\n * Asserts that the received object contains all of the specified values (using deep equality).\n * @param received - The object to check.\n * @param expectedValues - The values that must all be present.\n */\n toContainValues(received: object, expectedValues: unknown[]): ExpectationResult {\n if (typeof received !== 'object' || received === null) {\n return {\n pass: false,\n message: () => `Expected ${JSON.stringify(received)} to be an object.`,\n }\n }\n\n if (!Array.isArray(expectedValues)) {\n return {\n pass: false,\n message: () => `Expected values to be an array, but received ${JSON.stringify(expectedValues)}.`,\n }\n }\n\n const objectValues = Object.values(received)\n\n const deepEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true\n if (typeof a !== typeof b) return false\n if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') {\n const aKeys = Object.keys(a)\n const bKeys = Object.keys(b)\n if (aKeys.length !== bKeys.length) return false\n const aRecord = a as Record<string, unknown>\n const bRecord = b as Record<string, unknown>\n return aKeys.every(key => deepEqual(aRecord[key], bRecord[key]))\n }\n return false\n }\n\n const missingValues = expectedValues.filter(\n expectedValue => objectValues.every(value => !deepEqual(value, expectedValue)),\n )\n\n return missingValues.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected object not to contain all values ${JSON.stringify(expectedValues)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected object to contain all values ${JSON.stringify(expectedValues)}. Missing values: ${JSON.stringify(\n missingValues,\n )}.`,\n }\n },\n /**\n * Asserts the received value is empty (zero-length array/string, empty object, or empty Map/Set).\n * @param received - The value to check.\n */\n toBeEmpty(received: unknown): ExpectationResult {\n const isEmpty = (() => {\n if (Array.isArray(received) || typeof received === 'string') {\n return received.length === 0\n }\n if (received !== null && typeof received === 'object') {\n return Object.keys(received).length === 0\n }\n })()\n\n if (isEmpty === undefined) {\n return {\n pass: false,\n message: () =>\n `Expected value to be an empty array, string, object, Map, or Set, but received ${typeof received}.`,\n }\n }\n\n return isEmpty\n ? {\n pass: true,\n message: () =>\n 'Expected value not to be empty, but it was.',\n }\n : {\n pass: false,\n message: () =>\n 'Expected value to be empty, but it was not.',\n }\n },\n /**\n * Asserts the received value is a valid Date instance (not an invalid date).\n * @param received - The value to check.\n */\n toBeValidDate(\n received: unknown,\n ) {\n const isValid\n = received instanceof Date && !Number.isNaN(received.getTime())\n\n return {\n pass: isValid,\n message: () =>\n isValid\n ? `expected ${received.toISOString()} not to be a valid Date`\n : `expected ${formatValue(received)} to be a valid Date`,\n }\n },\n}\n"],
|
|
5
|
-
"mappings": ";AAYA,IAAM,cAAc,CAAC,UAA2B;AAC9C,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO,OAAO,KAAK;AAC7E,QAAM,OAAO,KAAK,UAAU,KAAK;AACjC,SAAO,QAAQ,OAAO,KAAK;AAC7B;AAQA,SAAS,SAAS,UAAmB,cAAyC;AAC5E,QAAM,
|
|
4
|
+
"sourcesContent": ["/** Result returned by a custom matcher function. */\nexport interface ExpectationResult {\n /** The actual value received by the matcher. */\n actual?: unknown\n /** The expected value the matcher compared against. */\n expected?: unknown\n /** Returns a human-readable failure or negation message. */\n message: () => string\n /** Whether the matcher assertion passed. */\n pass: boolean\n}\n\nconst formatValue = (value: unknown): string => {\n if (typeof value === 'string') return value\n if (typeof value === 'number' && !Number.isFinite(value)) return String(value)\n const json = JSON.stringify(value)\n return json ?? String(value)\n}\n\n/**\n * Checks whether the received value matches the expected JavaScript type and is not NaN.\n * @param received - The value to check.\n * @param expectedType - The expected `typeof` string (e.g. 'number', 'string').\n * @returns An ExpectationResult indicating pass or fail.\n */\nfunction toBeType(received: unknown, expectedType: string): ExpectationResult {\n const isPass = typeof received === expectedType && !Number.isNaN(received)\n return isPass\n ? {\n message: () => `expected ${formatValue(received)} not to be a ${expectedType}`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be a ${expectedType}`,\n pass: false,\n }\n}\n\n/** Collection of custom Vitest matchers extending the built-in `expect` assertions. */\nexport const matchers = {\n /**\n * Asserts the received value is an array with the specified length.\n * @param received - The value to check.\n * @param expectedSize - The expected array length.\n */\n toBeArrayOfSize(received: unknown, expectedSize: number): ExpectationResult {\n const isPass = Array.isArray(received) && received.length === expectedSize\n return isPass\n ? {\n message: () => `expected array not to have size ${expectedSize}, but received array of size ${received.length}`,\n pass: true,\n }\n : {\n message: () => Array.isArray(received)\n ? `expected array of size ${expectedSize}, but received array of size ${received.length}`\n : `expected array of size ${expectedSize}, but received a non-array`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is an array.\n * @param received - The value to check.\n */\n toBeArray(received: unknown): ExpectationResult {\n const isPass = Array.isArray(received)\n return isPass\n ? {\n message: () => 'expected array',\n pass: true,\n }\n : {\n message: () => `expected array, but received ${typeof received}`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is one of the values in the expected array.\n * @param received - The value to check.\n * @param expected - The array of acceptable values.\n */\n toBeOneOf(received: unknown, expected: unknown[]): ExpectationResult {\n const isPass = expected.includes(received)\n return isPass\n ? {\n pass: true,\n message: () =>\n `expected ${formatValue(received)} not to be one of ${JSON.stringify(expected)}`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${formatValue(received)} to be one of ${JSON.stringify(expected)}`,\n }\n },\n /**\n * Asserts the received number is negative (less than zero).\n * @param received - The number to check.\n */\n toBeNegative(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const isPass = received < 0\n return isPass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be negative`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be negative`,\n }\n },\n /**\n * Asserts the received number is positive (greater than zero).\n * @param received - The number to check.\n */\n toBePositive(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const isPass = received > 0\n return isPass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be positive`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be positive`,\n }\n },\n /**\n * Asserts the received value is of type `number` and not NaN.\n * @param received - The value to check.\n */\n toBeNumber: (received: unknown) => toBeType(received, 'number'),\n /**\n * Asserts the received value is of type `function`.\n * @param received - The value to check.\n */\n toBeFunction: (received: unknown) => toBeType(received, 'function'),\n /**\n * Asserts the received value is of type `string`.\n * @param received - The value to check.\n */\n toBeString: (received: unknown) => toBeType(received, 'string'),\n /**\n * Asserts the received value is a plain object (not an array or null).\n * @param received - The value to check.\n */\n toBeObject(received: unknown): ExpectationResult {\n const isPass = typeof received === 'object' && !Array.isArray(received) && received !== null\n return isPass\n ? {\n message: () => `expected ${formatValue(received)} to be object`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be an object but was ${Array.isArray(received) ? 'array' : typeof received}`,\n pass: false,\n }\n },\n /**\n * Asserts the received number is an integer.\n * @param received - The number to check.\n */\n toBeInteger(received: number): ExpectationResult {\n if (typeof received !== 'number') {\n throw new TypeError(`Expected a number, but received ${typeof received}`)\n }\n\n const isPass = Number.isSafeInteger(received)\n return isPass\n ? {\n pass: true,\n message: () =>\n `expected ${received} not to be an integer`,\n }\n : {\n pass: false,\n message: () =>\n `expected ${received} to be an integer`,\n }\n },\n /**\n * Asserts the received value is strictly `false`.\n * @param received - The value to check.\n */\n toBeFalse(received: unknown): ExpectationResult {\n const isPass = received === false\n return isPass\n ? {\n message: () => `expected ${formatValue(received)} to be false`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be false but was not false`,\n pass: false,\n }\n },\n /**\n * Asserts the received value is strictly `true`.\n * @param received - The value to check.\n */\n toBeTrue(received: unknown): ExpectationResult {\n const isPass = received === true\n return isPass\n ? {\n message: () => `expected ${formatValue(received)} to be true`,\n pass: true,\n }\n : {\n message: () => `expected ${formatValue(received)} to be true but was not true`,\n pass: false,\n }\n },\n /**\n * Asserts that all expected values are present in the received array or object values.\n * @param received - The array or object to check.\n * @param expectedValues - The values that must all be present.\n */\n toContainAllValues(received: unknown, expectedValues: unknown[]) {\n let receivedValues: unknown[]\n\n // Check if received is an array or an object\n if (Array.isArray(received)) {\n receivedValues = received\n } else if (typeof received === 'object' && received !== null) {\n receivedValues = Object.values(received)\n } else {\n return {\n pass: false,\n message: () => `Expected an array or object, but received ${typeof received}.`,\n }\n }\n\n // Check if all expected values are in the received values\n const isPass = expectedValues.every(value => receivedValues.includes(value))\n\n return {\n pass: isPass,\n message: () =>\n isPass\n ? `Expected ${JSON.stringify(received)} not to contain all values ${JSON.stringify(expectedValues)}, but it does.`\n : `Expected ${JSON.stringify(received)} to contain all values ${JSON.stringify(expectedValues)}, but it does not.`,\n }\n },\n /**\n * Asserts that the received object contains the specified key.\n * @param received - The object to check.\n * @param key - The key that should be present.\n */\n toContainKey(received: object, key: string) {\n const isPass = Object.prototype.hasOwnProperty.call(received, key)\n return isPass\n ? {\n pass: true,\n message: () => `Expected object not to contain key \"${key}\", but it does.`,\n }\n : {\n pass: false,\n message: () => `Expected object to contain key \"${key}\", but it does not.`,\n }\n },\n /**\n * Asserts that the received array, string, or object values include the specified value.\n * @param received - The array, string, or object to search within.\n * @param value - The value to look for.\n */\n toInclude(received: unknown, value: unknown) {\n let isPass: boolean\n\n if (Array.isArray(received)) {\n isPass = received.includes(value)\n } else if (typeof received === 'string') {\n isPass = received.includes(String(value))\n } else if (typeof received === 'object' && received !== null) {\n isPass = Object.values(received).includes(value)\n } else {\n isPass = false\n }\n\n return {\n pass: isPass,\n message: () =>\n isPass\n ? `Expected ${JSON.stringify(received)} not to include ${JSON.stringify(value)}, but it does.`\n : `Expected ${JSON.stringify(received)} to include ${JSON.stringify(value)}, but it does not.`,\n }\n },\n /**\n * Asserts that the received array includes all members of the expected array.\n * @param received - The array to check.\n * @param expected - The members that must all be present.\n */\n toIncludeAllMembers(received: unknown[], expected: unknown[]): ExpectationResult {\n if (!Array.isArray(received) || !Array.isArray(expected)) {\n return {\n pass: false,\n message: () => 'Expected both received and expected values to be arrays.',\n }\n }\n\n const missingMembers = expected.filter(item => !received.includes(item))\n\n return missingMembers.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected array not to include all members of ${JSON.stringify(expected)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected array to include all members of ${JSON.stringify(expected)}. Missing members: ${JSON.stringify(\n missingMembers,\n )}.`,\n }\n },\n /**\n * Asserts that the received object contains all of the specified keys.\n * @param received - The object to check.\n * @param expectedKeys - The keys that must all be present.\n */\n toContainAllKeys(received: object, expectedKeys: string[]): ExpectationResult {\n if (typeof received !== 'object' || received === null) {\n return {\n pass: false,\n message: () => `Expected ${JSON.stringify(received)} to be an object.`,\n }\n }\n\n if (!Array.isArray(expectedKeys)) {\n return {\n pass: false,\n message: () => `Expected keys to be an array, but received ${JSON.stringify(expectedKeys)}.`,\n }\n }\n\n const missingKeys = expectedKeys.filter(key => !Object.hasOwn(received, key))\n\n return missingKeys.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected object not to contain all keys ${JSON.stringify(expectedKeys)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected object to contain all keys ${JSON.stringify(expectedKeys)}. Missing keys: ${JSON.stringify(\n missingKeys,\n )}.`,\n }\n },\n /**\n * Asserts that the received object contains all of the specified values (using deep equality).\n * @param received - The object to check.\n * @param expectedValues - The values that must all be present.\n */\n toContainValues(received: object, expectedValues: unknown[]): ExpectationResult {\n if (typeof received !== 'object' || received === null) {\n return {\n pass: false,\n message: () => `Expected ${JSON.stringify(received)} to be an object.`,\n }\n }\n\n if (!Array.isArray(expectedValues)) {\n return {\n pass: false,\n message: () => `Expected values to be an array, but received ${JSON.stringify(expectedValues)}.`,\n }\n }\n\n const objectValues = Object.values(received)\n\n const deepEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true\n if (typeof a !== typeof b) return false\n if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') {\n const aKeys = Object.keys(a)\n const bKeys = Object.keys(b)\n if (aKeys.length !== bKeys.length) return false\n const aRecord = a as Record<string, unknown>\n const bRecord = b as Record<string, unknown>\n return aKeys.every(key => deepEqual(aRecord[key], bRecord[key]))\n }\n return false\n }\n\n const missingValues = expectedValues.filter(\n expectedValue => objectValues.every(value => !deepEqual(value, expectedValue)),\n )\n\n return missingValues.length === 0\n ? {\n pass: true,\n message: () =>\n `Expected object not to contain all values ${JSON.stringify(expectedValues)}, but it does.`,\n }\n : {\n pass: false,\n message: () =>\n `Expected object to contain all values ${JSON.stringify(expectedValues)}. Missing values: ${JSON.stringify(\n missingValues,\n )}.`,\n }\n },\n /**\n * Asserts the received value is empty (zero-length array/string, empty object, or empty Map/Set).\n * @param received - The value to check.\n */\n toBeEmpty(received: unknown): ExpectationResult {\n const isEmpty = (() => {\n if (Array.isArray(received) || typeof received === 'string') {\n return received.length === 0\n }\n if (received !== null && typeof received === 'object') {\n return Object.keys(received).length === 0\n }\n })()\n\n if (isEmpty === undefined) {\n return {\n pass: false,\n message: () =>\n `Expected value to be an empty array, string, object, Map, or Set, but received ${typeof received}.`,\n }\n }\n\n return isEmpty\n ? {\n pass: true,\n message: () =>\n 'Expected value not to be empty, but it was.',\n }\n : {\n pass: false,\n message: () =>\n 'Expected value to be empty, but it was not.',\n }\n },\n /**\n * Asserts the received value is a valid Date instance (not an invalid date).\n * @param received - The value to check.\n */\n toBeValidDate(\n received: unknown,\n ) {\n const isValid\n = received instanceof Date && !Number.isNaN(received.getTime())\n\n return {\n pass: isValid,\n message: () =>\n isValid\n ? `expected ${received.toISOString()} not to be a valid Date`\n : `expected ${formatValue(received)} to be a valid Date`,\n }\n },\n}\n"],
|
|
5
|
+
"mappings": ";AAYA,IAAM,cAAc,CAAC,UAA2B;AAC9C,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO,OAAO,KAAK;AAC7E,QAAM,OAAO,KAAK,UAAU,KAAK;AACjC,SAAO,QAAQ,OAAO,KAAK;AAC7B;AAQA,SAAS,SAAS,UAAmB,cAAyC;AAC5E,QAAM,SAAS,OAAO,aAAa,gBAAgB,CAAC,OAAO,MAAM,QAAQ;AACzE,SAAO,SACH;AAAA,IACE,SAAS,MAAM,YAAY,YAAY,QAAQ,CAAC,gBAAgB,YAAY;AAAA,IAC5E,MAAM;AAAA,EACR,IACA;AAAA,IACE,SAAS,MAAM,YAAY,YAAY,QAAQ,CAAC,YAAY,YAAY;AAAA,IACxE,MAAM;AAAA,EACR;AACN;AAGO,IAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,gBAAgB,UAAmB,cAAyC;AAC1E,UAAM,SAAS,MAAM,QAAQ,QAAQ,KAAK,SAAS,WAAW;AAC9D,WAAO,SACH;AAAA,MACE,SAAS,M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;AAAA,IACJ;AAAA,EACN;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,cACE,UACA;AACA,UAAM,UACF,oBAAoB,QAAQ,CAAC,OAAO,MAAM,SAAS,QAAQ,CAAC;AAEhE,WAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MACP,UACI,YAAY,SAAS,YAAY,CAAC,4BAClC,YAAY,YAAY,QAAQ,CAAC;AAAA,IACzC;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/vitest-matchers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"log",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"README.md"
|
|
48
48
|
],
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@xylabs/toolchain": "^8.
|
|
51
|
-
"@xylabs/tsconfig": "^8.
|
|
52
|
-
"browserslist": "
|
|
50
|
+
"@xylabs/toolchain": "^8.4.1",
|
|
51
|
+
"@xylabs/tsconfig": "^8.4.1",
|
|
52
|
+
"browserslist": "4.28.4",
|
|
53
53
|
"eslint": "^10.5.0",
|
|
54
|
-
"eslint-import-resolver-typescript": "^4.4",
|
|
54
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
55
55
|
"typescript": "^6.0.3",
|
|
56
56
|
"vite": "^8.1.0",
|
|
57
57
|
"vitest": "^4.1.9"
|