@jest/expect-utils 30.0.1 → 30.0.3
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/build/index.d.mts +35 -0
- package/package.json +3 -3
@@ -0,0 +1,35 @@
|
|
1
|
+
//#region src/types.d.ts
|
2
|
+
|
3
|
+
type Tester = (this: TesterContext, a: any, b: any, customTesters: Array<Tester>) => boolean | undefined;
|
4
|
+
interface TesterContext {
|
5
|
+
equals: EqualsFunction;
|
6
|
+
}
|
7
|
+
//#endregion
|
8
|
+
//#region src/jasmineUtils.d.ts
|
9
|
+
type EqualsFunction = (a: unknown, b: unknown, customTesters?: Array<Tester>, strictCheck?: boolean) => boolean;
|
10
|
+
declare const equals: EqualsFunction;
|
11
|
+
declare function isA<T>(typeName: string, value: unknown): value is T;
|
12
|
+
//#endregion
|
13
|
+
//#region src/utils.d.ts
|
14
|
+
type GetPath = {
|
15
|
+
hasEndProp?: boolean;
|
16
|
+
endPropIsDefined?: boolean;
|
17
|
+
lastTraversedObject: unknown;
|
18
|
+
traversedPath: Array<string>;
|
19
|
+
value?: unknown;
|
20
|
+
};
|
21
|
+
declare const getObjectKeys: (object: object) => Array<string | symbol>;
|
22
|
+
declare const getPath: (object: Record<string, any>, propertyPath: string | Array<string>) => GetPath;
|
23
|
+
declare const getObjectSubset: (object: any, subset: any, customTesters?: Array<Tester>, seenReferences?: WeakMap<object, boolean>) => any;
|
24
|
+
declare const iterableEquality: (a: any, b: any, customTesters?: Array<Tester>, aStack?: Array<any>, bStack?: Array<any>) => boolean | undefined;
|
25
|
+
declare const subsetEquality: (object: unknown, subset: unknown, customTesters?: Array<Tester>) => boolean | undefined;
|
26
|
+
declare const typeEquality: (a: any, b: any) => boolean | undefined;
|
27
|
+
declare const arrayBufferEquality: (a: unknown, b: unknown) => boolean | undefined;
|
28
|
+
declare const sparseArrayEquality: (a: unknown, b: unknown, customTesters?: Array<Tester>) => boolean | undefined;
|
29
|
+
declare const partition: <T>(items: Array<T>, predicate: (arg: T) => boolean) => [Array<T>, Array<T>];
|
30
|
+
declare const pathAsArray: (propertyPath: string) => Array<any>;
|
31
|
+
declare const isError: (value: unknown) => value is Error;
|
32
|
+
declare function emptyObject(obj: unknown): boolean;
|
33
|
+
declare const isOneline: (expected: unknown, received: unknown) => boolean;
|
34
|
+
//#endregion
|
35
|
+
export { EqualsFunction, Tester, TesterContext, arrayBufferEquality, emptyObject, equals, getObjectKeys, getObjectSubset, getPath, isA, isError, isOneline, iterableEquality, partition, pathAsArray, sparseArrayEquality, subsetEquality, typeEquality };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jest/expect-utils",
|
3
|
-
"version": "30.0.
|
3
|
+
"version": "30.0.3",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://github.com/jestjs/jest.git",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
25
|
"immutable": "^5.1.2",
|
26
|
-
"jest-matcher-utils": "30.0.
|
26
|
+
"jest-matcher-utils": "30.0.3"
|
27
27
|
},
|
28
28
|
"engines": {
|
29
29
|
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
@@ -31,5 +31,5 @@
|
|
31
31
|
"publishConfig": {
|
32
32
|
"access": "public"
|
33
33
|
},
|
34
|
-
"gitHead": "
|
34
|
+
"gitHead": "d4a6c94daf4f6e63c949f2d0ed907aeaee840d2f"
|
35
35
|
}
|