@overkill-dev/doubles 0.0.2 → 0.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/assert/assertion-extension.d.ts +4 -4
- package/assert/assertion-extension.js +3 -3
- package/assert/assertion-extension.js.map +1 -1
- package/doubles/double-behavior.js +1 -1
- package/doubles/double-usage-argument-assertion.js +1 -1
- package/doubles/double-usage-contract.d.ts +2 -2
- package/package.json +4 -2
- package/sbom.cdx.json +26 -6
- package/assertion-protocol/assertion-evaluation.d.ts +0 -13
- package/assertion-protocol/assertion-evaluation.d.ts.map +0 -1
- package/assertion-protocol/assertion-node-shape.d.ts +0 -71
- package/assertion-protocol/assertion-node-shape.d.ts.map +0 -1
- package/assertion-protocol/assertion-node.d.ts +0 -97
- package/assertion-protocol/assertion-node.d.ts.map +0 -1
- package/assertion-protocol/assertion-reference.d.ts +0 -73
- package/assertion-protocol/assertion-reference.d.ts.map +0 -1
- package/assertion-protocol/assertion-reference.js +0 -49
- package/assertion-protocol/assertion-reference.js.map +0 -1
- package/assertion-protocol/assertions/boolean.d.ts +0 -11
- package/assertion-protocol/assertions/boolean.d.ts.map +0 -1
- package/assertion-protocol/assertions/collection.d.ts +0 -22
- package/assertion-protocol/assertions/collection.d.ts.map +0 -1
- package/assertion-protocol/assertions/equality.d.ts +0 -17
- package/assertion-protocol/assertions/equality.d.ts.map +0 -1
- package/assertion-protocol/assertions/fail.d.ts +0 -13
- package/assertion-protocol/assertions/fail.d.ts.map +0 -1
- package/assertion-protocol/assertions/numeric.d.ts +0 -29
- package/assertion-protocol/assertions/numeric.d.ts.map +0 -1
- package/assertion-protocol/assertions/partial.d.ts +0 -14
- package/assertion-protocol/assertions/partial.d.ts.map +0 -1
- package/assertion-protocol/assertions/presence.d.ts +0 -17
- package/assertion-protocol/assertions/presence.d.ts.map +0 -1
- package/assertion-protocol/assertions/string.d.ts +0 -28
- package/assertion-protocol/assertions/string.d.ts.map +0 -1
- package/assertion-protocol/assertions/type-shape.d.ts +0 -42
- package/assertion-protocol/assertions/type-shape.d.ts.map +0 -1
- package/assertion-protocol/thrown-error-record.d.ts +0 -8
- package/assertion-protocol/thrown-error-record.d.ts.map +0 -1
- package/assertion-protocol/thrown-error-record.js +0 -17
- package/assertion-protocol/thrown-error-record.js.map +0 -1
- package/assertion-protocol/thrown-matcher.d.ts +0 -51
- package/assertion-protocol/thrown-matcher.d.ts.map +0 -1
- package/assertion-protocol/thrown-matcher.js +0 -186
- package/assertion-protocol/thrown-matcher.js.map +0 -1
- package/compare/comparison-result.d.ts +0 -25
- package/compare/comparison-result.d.ts.map +0 -1
- package/compare/comparison-state.d.ts +0 -7
- package/compare/comparison-state.d.ts.map +0 -1
- package/compare/comparison-state.js +0 -20
- package/compare/comparison-state.js.map +0 -1
- package/compare/comparison.d.ts +0 -12
- package/compare/comparison.d.ts.map +0 -1
- package/compare/raw-comparison.d.ts +0 -24
- package/compare/raw-comparison.d.ts.map +0 -1
- package/compare/raw-comparison.js +0 -285
- package/compare/raw-comparison.js.map +0 -1
- package/compare/serialized-value-shape.d.ts +0 -143
- package/compare/serialized-value-shape.d.ts.map +0 -1
- package/compare/serialized-value.d.ts +0 -11
- package/compare/serialized-value.d.ts.map +0 -1
- package/compare/value-classification.d.ts +0 -26
- package/compare/value-classification.d.ts.map +0 -1
- package/compare/value-classification.js +0 -110
- package/compare/value-classification.js.map +0 -1
- package/diff/diff-shape.d.ts +0 -117
- package/diff/diff-shape.d.ts.map +0 -1
- package/doubles/disposal-symbol.d.ts +0 -3
- package/doubles/disposal-symbol.d.ts.map +0 -1
- package/doubles/double-chronology.d.ts +0 -21
- package/doubles/double-chronology.d.ts.map +0 -1
- package/doubles/double-history-api.d.ts +0 -33
- package/doubles/double-history-api.d.ts.map +0 -1
- package/doubles/double-runtime.d.ts +0 -9
- package/doubles/double-runtime.d.ts.map +0 -1
- package/doubles/double-usage-argument-assertion.d.ts +0 -27
- package/doubles/double-usage-argument-assertion.d.ts.map +0 -1
- package/doubles/double-usage-count-assertion.d.ts +0 -6
- package/doubles/double-usage-count-assertion.d.ts.map +0 -1
- package/doubles/double-usage-disposal-assertion.d.ts +0 -7
- package/doubles/double-usage-disposal-assertion.d.ts.map +0 -1
- package/doubles/double-usage-inspection.d.ts +0 -22
- package/doubles/double-usage-inspection.d.ts.map +0 -1
- package/doubles/double-usage-iterator-assertion.d.ts +0 -7
- package/doubles/double-usage-iterator-assertion.d.ts.map +0 -1
- package/doubles/double-usage-order-assertion.d.ts +0 -3
- package/doubles/double-usage-order-assertion.d.ts.map +0 -1
- package/doubles/protocol-double-metadata.d.ts +0 -15
- package/doubles/protocol-double-metadata.d.ts.map +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type AssertionOutcome } from '../assertion-evaluation.ts';
|
|
2
|
-
import type { AssertionSource, ExpectedAssertionNode, ResolvableSourceLocation } from '../assertion-node-shape.ts';
|
|
3
|
-
type NumericComparisonCheck = 'greater-than' | 'greater-than-or-equal' | 'less-than' | 'less-than-or-equal';
|
|
4
|
-
export type NumericComparisonAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
5
|
-
readonly [Check in NumericComparisonCheck]: ExpectedAssertionNode<Source, Check>;
|
|
6
|
-
}[NumericComparisonCheck];
|
|
7
|
-
export type BetweenAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
8
|
-
readonly actual: unknown;
|
|
9
|
-
readonly check: 'between';
|
|
10
|
-
readonly location: ResolvableSourceLocation;
|
|
11
|
-
readonly maximum: number;
|
|
12
|
-
readonly message: string | null;
|
|
13
|
-
readonly minimum: number;
|
|
14
|
-
readonly source: Source;
|
|
15
|
-
};
|
|
16
|
-
export declare const numericSummaryByCheck: {
|
|
17
|
-
readonly between: "Expected number to be between the bounds.";
|
|
18
|
-
readonly 'greater-than': "Expected number to be greater than the threshold.";
|
|
19
|
-
readonly 'greater-than-or-equal': "Expected number to be greater than or equal to the threshold.";
|
|
20
|
-
readonly 'less-than': "Expected number to be less than the threshold.";
|
|
21
|
-
readonly 'less-than-or-equal': "Expected number to be less than or equal to the threshold.";
|
|
22
|
-
};
|
|
23
|
-
export declare function evaluateBetween(assertion: BetweenAssertionNode): AssertionOutcome;
|
|
24
|
-
export declare function evaluateGreaterThan(assertion: NumericComparisonAssertionNode): AssertionOutcome;
|
|
25
|
-
export declare function evaluateGreaterThanOrEqual(assertion: NumericComparisonAssertionNode): AssertionOutcome;
|
|
26
|
-
export declare function evaluateLessThan(assertion: NumericComparisonAssertionNode): AssertionOutcome;
|
|
27
|
-
export declare function evaluateLessThanOrEqual(assertion: NumericComparisonAssertionNode): AssertionOutcome;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=numeric.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numeric.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/numeric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEnH,KAAK,sBAAsB,GAAG,cAAc,GAAG,uBAAuB,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAE5G,MAAM,MAAM,8BAA8B,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IAC3F,QAAQ,EAAE,KAAK,IAAI,sBAAsB,GAAG,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC;CACnF,CAAC,sBAAsB,CAAC,CAAC;AAE1B,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IACjF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;AAMX,wBAAgB,eAAe,CAAC,SAAS,EAAE,oBAAoB,GAAG,gBAAgB,CAOjF;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,8BAA8B,GAAG,gBAAgB,CAM/F;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,8BAA8B,GAAG,gBAAgB,CAMtG;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,8BAA8B,GAAG,gBAAgB,CAM5F;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,8BAA8B,GAAG,gBAAgB,CAMnG"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type AssertionOutcome } from '../assertion-evaluation.ts';
|
|
2
|
-
import type { AssertionSource, ExpectedAssertionNode } from '../assertion-node-shape.ts';
|
|
3
|
-
export type PartialDeepEqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'partial-deep-equal'>;
|
|
4
|
-
export type ArrayContainsPartialAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'array-contains-partial'>;
|
|
5
|
-
export type MembersPartialDeepEqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'members-partial-deep-equal'>;
|
|
6
|
-
export declare const partialSummaryByCheck: {
|
|
7
|
-
readonly 'array-contains-partial': "Expected array to contain a partial member.";
|
|
8
|
-
readonly 'members-partial-deep-equal': "Expected array to contain the partial members.";
|
|
9
|
-
readonly 'partial-deep-equal': "Expected value to partially match.";
|
|
10
|
-
};
|
|
11
|
-
export declare function evaluateArrayContainsPartial(assertion: ArrayContainsPartialAssertionNode): AssertionOutcome;
|
|
12
|
-
export declare function evaluateMembersPartialDeepEqual(assertion: MembersPartialDeepEqualAssertionNode): AssertionOutcome;
|
|
13
|
-
export declare function evaluatePartialDeepEqual(assertion: PartialDeepEqualAssertionNode): AssertionOutcome;
|
|
14
|
-
//# sourceMappingURL=partial.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/partial.ts"],"names":[],"mappings":"AAKA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEzF,MAAM,MAAM,6BAA6B,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CAC/G,MAAM,EACN,oBAAoB,CACvB,CAAC;AAEF,MAAM,MAAM,iCAAiC,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CACnH,MAAM,EACN,wBAAwB,CAC3B,CAAC;AAEF,MAAM,MAAM,oCAAoC,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAC7F,qBAAqB,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AAEX,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,iCAAiC,GAAG,gBAAgB,CAE3G;AAED,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,oCAAoC,GAAG,gBAAgB,CAEjH;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,6BAA6B,GAAG,gBAAgB,CAEnG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type AssertionOutcome } from '../assertion-evaluation.ts';
|
|
2
|
-
import type { ActualAssertionNode, AssertionSource } from '../assertion-node-shape.ts';
|
|
3
|
-
export type DefinedAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'defined'>;
|
|
4
|
-
export type NullAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'null'>;
|
|
5
|
-
export type NotNullAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'not-null'>;
|
|
6
|
-
export type UndefinedAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'undefined'>;
|
|
7
|
-
export declare const presenceSummaryByCheck: {
|
|
8
|
-
readonly defined: "Expected value to be defined.";
|
|
9
|
-
readonly 'not-null': "Expected value not to be null.";
|
|
10
|
-
readonly null: "Expected value to be null.";
|
|
11
|
-
readonly undefined: "Expected value to be undefined.";
|
|
12
|
-
};
|
|
13
|
-
export declare function evaluateDefined(assertion: DefinedAssertionNode): AssertionOutcome;
|
|
14
|
-
export declare function evaluateNotNull(assertion: NotNullAssertionNode): AssertionOutcome;
|
|
15
|
-
export declare function evaluateNull(assertion: NullAssertionNode): AssertionOutcome;
|
|
16
|
-
export declare function evaluateUndefined(assertion: UndefinedAssertionNode): AssertionOutcome;
|
|
17
|
-
//# sourceMappingURL=presence.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEvF,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CACpG,MAAM,EACN,SAAS,CACZ,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtH,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CACpG,MAAM,EACN,UAAU,CACb,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CACtG,MAAM,EACN,WAAW,CACd,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,wBAAgB,eAAe,CAAC,SAAS,EAAE,oBAAoB,GAAG,gBAAgB,CAMjF;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,oBAAoB,GAAG,gBAAgB,CAEjF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE3E;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAErF"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type AssertionOutcome } from '../assertion-evaluation.ts';
|
|
2
|
-
import type { AssertionSource, ExpectedAssertionNode, ResolvableSourceLocation } from '../assertion-node-shape.ts';
|
|
3
|
-
export type MatchAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
4
|
-
readonly [Check in 'match' | 'not-match']: {
|
|
5
|
-
readonly actual: unknown;
|
|
6
|
-
readonly check: Check;
|
|
7
|
-
readonly location: ResolvableSourceLocation;
|
|
8
|
-
readonly message: string | null;
|
|
9
|
-
readonly pattern: RegExp;
|
|
10
|
-
readonly source: Source;
|
|
11
|
-
};
|
|
12
|
-
}['match' | 'not-match'];
|
|
13
|
-
export type StringContainsAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
14
|
-
readonly [Check in 'ends-with' | 'includes' | 'starts-with']: ExpectedAssertionNode<Source, Check>;
|
|
15
|
-
}['ends-with' | 'includes' | 'starts-with'];
|
|
16
|
-
export declare const stringSummaryByCheck: {
|
|
17
|
-
readonly 'ends-with': "Expected string to end with the value.";
|
|
18
|
-
readonly includes: "Expected string to include the value.";
|
|
19
|
-
readonly match: "Expected string to match the pattern.";
|
|
20
|
-
readonly 'not-match': "Expected string not to match the pattern.";
|
|
21
|
-
readonly 'starts-with': "Expected string to start with the value.";
|
|
22
|
-
};
|
|
23
|
-
export declare function evaluateEndsWith(assertion: StringContainsAssertionNode): AssertionOutcome;
|
|
24
|
-
export declare function evaluateIncludes(assertion: StringContainsAssertionNode): AssertionOutcome;
|
|
25
|
-
export declare function evaluateMatch(assertion: MatchAssertionNode): AssertionOutcome;
|
|
26
|
-
export declare function evaluateNotMatch(assertion: MatchAssertionNode): AssertionOutcome;
|
|
27
|
-
export declare function evaluateStartsWith(assertion: StringContainsAssertionNode): AssertionOutcome;
|
|
28
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEnH,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IAC/E,QAAQ,EAAE,KAAK,IAAI,OAAO,GAAG,WAAW,GAAG;QACvC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QACtB,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;QAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KAC3B;CACJ,CAAC,OAAO,GAAG,WAAW,CAAC,CAAC;AAEzB,MAAM,MAAM,2BAA2B,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IACxF,QAAQ,EAAE,KAAK,IAAI,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC;CACrG,CAAC,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,2BAA2B,GAAG,gBAAgB,CAMzF;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,2BAA2B,GAAG,gBAAgB,CAMzF;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAM7E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,2BAA2B,GAAG,gBAAgB,CAM3F"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type AssertionOutcome } from '../assertion-evaluation.ts';
|
|
2
|
-
import type { ActualAssertionNode, AssertionSource, InstanceConstructor, ResolvableSourceLocation } from '../assertion-node-shape.ts';
|
|
3
|
-
type TypeAssertionCheck = 'array' | 'boolean' | 'function' | 'number' | 'object' | 'string';
|
|
4
|
-
export type TypeAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
5
|
-
readonly [Check in TypeAssertionCheck]: ActualAssertionNode<Source, Check>;
|
|
6
|
-
}[TypeAssertionCheck];
|
|
7
|
-
export type InstanceOfAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
8
|
-
readonly actual: unknown;
|
|
9
|
-
readonly check: 'instance-of';
|
|
10
|
-
readonly expected: InstanceConstructor;
|
|
11
|
-
readonly location: ResolvableSourceLocation;
|
|
12
|
-
readonly message: string | null;
|
|
13
|
-
readonly source: Source;
|
|
14
|
-
};
|
|
15
|
-
export type HasPropertyAssertionNode<Source extends AssertionSource = AssertionSource> = {
|
|
16
|
-
readonly actual: unknown;
|
|
17
|
-
readonly check: 'has-property';
|
|
18
|
-
readonly key: PropertyKey;
|
|
19
|
-
readonly location: ResolvableSourceLocation;
|
|
20
|
-
readonly message: string | null;
|
|
21
|
-
readonly source: Source;
|
|
22
|
-
};
|
|
23
|
-
export declare const typeShapeSummaryByCheck: {
|
|
24
|
-
readonly array: "Expected value to be an array.";
|
|
25
|
-
readonly boolean: "Expected value to be a boolean.";
|
|
26
|
-
readonly function: "Expected value to be a function.";
|
|
27
|
-
readonly 'has-property': "Expected object to have the own property.";
|
|
28
|
-
readonly 'instance-of': "Expected value to be an instance of the constructor.";
|
|
29
|
-
readonly number: "Expected value to be a number.";
|
|
30
|
-
readonly object: "Expected value to be an object.";
|
|
31
|
-
readonly string: "Expected value to be a string.";
|
|
32
|
-
};
|
|
33
|
-
export declare function evaluateArray(assertion: TypeAssertionNode): AssertionOutcome;
|
|
34
|
-
export declare function evaluateBoolean(assertion: TypeAssertionNode): AssertionOutcome;
|
|
35
|
-
export declare function evaluateFunction(assertion: TypeAssertionNode): AssertionOutcome;
|
|
36
|
-
export declare function evaluateHasProperty(assertion: HasPropertyAssertionNode): AssertionOutcome;
|
|
37
|
-
export declare function evaluateInstanceOf(assertion: InstanceOfAssertionNode): AssertionOutcome;
|
|
38
|
-
export declare function evaluateNumber(assertion: TypeAssertionNode): AssertionOutcome;
|
|
39
|
-
export declare function evaluateObject(assertion: TypeAssertionNode): AssertionOutcome;
|
|
40
|
-
export declare function evaluateString(assertion: TypeAssertionNode): AssertionOutcome;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=type-shape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-shape.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/type-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EACR,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EAC3B,MAAM,4BAA4B,CAAC;AAGpC,KAAK,kBAAk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GAAG,gBAAgB,CAE/E;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,wBAAwB,GAAG,gBAAgB,CAMzF;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,uBAAuB,GAAG,gBAAgB,CAEvF;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE7E;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE7E;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE7E"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type ThrownErrorRecord = {
|
|
2
|
-
readonly message: string;
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly stack: string | null;
|
|
5
|
-
readonly thrown: unknown;
|
|
6
|
-
};
|
|
7
|
-
export declare function createThrownErrorRecord(thrown: unknown): ThrownErrorRecord;
|
|
8
|
-
//# sourceMappingURL=thrown-error-record.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thrown-error-record.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/thrown-error-record.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAgB1E"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export function createThrownErrorRecord(thrown) {
|
|
2
|
-
if (thrown instanceof Error) {
|
|
3
|
-
return {
|
|
4
|
-
message: thrown.message,
|
|
5
|
-
name: thrown.name,
|
|
6
|
-
stack: thrown.stack ?? null,
|
|
7
|
-
thrown
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
message: 'Test body threw a non-error value.',
|
|
12
|
-
name: typeof thrown,
|
|
13
|
-
stack: null,
|
|
14
|
-
thrown
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=thrown-error-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thrown-error-record.js","sourceRoot":"","sources":["../../../../source/assertion-protocol/thrown-error-record.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,uBAAuB,CAAC,MAAe;IACnD,IAAI,MAAM,YAAY,KAAK,EAAE,CAAC;QAC1B,OAAO;YACH,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;YAC3B,MAAM;SACT,CAAC;IACN,CAAC;IAED,OAAO;QACH,OAAO,EAAE,oCAAoC;QAC7C,IAAI,EAAE,OAAO,MAAM;QACnB,KAAK,EAAE,IAAI;QACX,MAAM;KACT,CAAC;AACN,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { CompositeAssertionChildNode, CompositeAssertionNode } from './assertion-node.ts';
|
|
2
|
-
import type { AssertionSource, InstanceConstructor, NonEmptyReadonlyArray, ResolvableSourceLocation } from './assertion-node-shape.ts';
|
|
3
|
-
type OptionalFields<Shape, RequiredKey extends keyof Shape> = {
|
|
4
|
-
readonly [ShapeKey in keyof Shape as ShapeKey extends RequiredKey ? never : ShapeKey]?: Shape[ShapeKey];
|
|
5
|
-
};
|
|
6
|
-
type RequiredField<Shape, RequiredKey extends keyof Shape> = {
|
|
7
|
-
readonly [ShapeKey in RequiredKey]-?: Shape[ShapeKey];
|
|
8
|
-
};
|
|
9
|
-
type RequireAtLeastOne<Shape, Key extends keyof Shape = keyof Shape> = {
|
|
10
|
-
readonly [RequiredKey in Key]: OptionalFields<Shape, RequiredKey> & RequiredField<Shape, RequiredKey>;
|
|
11
|
-
}[Key];
|
|
12
|
-
type ErrorConstructor = InstanceConstructor & (abstract new (...args: never[]) => Error);
|
|
13
|
-
type ErrorMatcherFields = {
|
|
14
|
-
readonly cause: ThrownMatcher;
|
|
15
|
-
readonly code: string;
|
|
16
|
-
readonly message: RegExp | string;
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly type: ErrorConstructor;
|
|
19
|
-
};
|
|
20
|
-
export type ExactThrownMatcher = {
|
|
21
|
-
readonly cause?: never;
|
|
22
|
-
readonly code?: never;
|
|
23
|
-
readonly exact: unknown;
|
|
24
|
-
readonly message?: never;
|
|
25
|
-
readonly name?: never;
|
|
26
|
-
readonly type?: never;
|
|
27
|
-
};
|
|
28
|
-
export type ErrorMatcher = RequireAtLeastOne<ErrorMatcherFields> & {
|
|
29
|
-
readonly exact?: never;
|
|
30
|
-
};
|
|
31
|
-
export type ThrownMatcher = ErrorMatcher | ExactThrownMatcher;
|
|
32
|
-
type NonPromise<Body extends () => unknown> = ReturnType<Body> extends PromiseLike<unknown> ? never : Body;
|
|
33
|
-
export type SynchronousCallback<Body extends () => unknown> = [ReturnType<Body>] extends [never] ? Body : NonPromise<Body>;
|
|
34
|
-
type ThrownAssertionKind = 'rejects' | 'throws';
|
|
35
|
-
type ObservationStatus = 'rejected' | 'resolved' | 'returned' | 'threw';
|
|
36
|
-
export type ThrownAssertionObservation = {
|
|
37
|
-
readonly status: ObservationStatus;
|
|
38
|
-
readonly value: unknown;
|
|
39
|
-
};
|
|
40
|
-
type ThrownAssertionInput<Source extends AssertionSource> = {
|
|
41
|
-
readonly kind: ThrownAssertionKind;
|
|
42
|
-
readonly location: ResolvableSourceLocation;
|
|
43
|
-
readonly matcher: ThrownMatcher;
|
|
44
|
-
readonly message: string | null;
|
|
45
|
-
readonly observation: ThrownAssertionObservation;
|
|
46
|
-
readonly source: Source;
|
|
47
|
-
};
|
|
48
|
-
export declare function thrownMatcherChildren<Source extends AssertionSource>(input: ThrownAssertionInput<Source>): NonEmptyReadonlyArray<CompositeAssertionChildNode<Source>>;
|
|
49
|
-
export declare function createThrownMatcherAssertion<Source extends AssertionSource>(input: ThrownAssertionInput<Source>): CompositeAssertionNode<Source>;
|
|
50
|
-
export {};
|
|
51
|
-
//# sourceMappingURL=thrown-matcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thrown-matcher.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/thrown-matcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,sBAAsB,EACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACR,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,KAAK,cAAc,CAAC,KAAK,EAAE,WAAW,SAAS,MAAM,KAAK,IAAI;IAC1D,QAAQ,EAAE,QAAQ,IAAI,MAAM,KAAK,IAAI,QAAQ,SAAS,WAAW,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;CAC1G,CAAC;AAEF,KAAK,aAAa,CAAC,KAAK,EAAE,WAAW,SAAS,MAAM,KAAK,IAAI;IACzD,QAAQ,EAAE,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;CACxD,CAAC;AAEF,KAAK,iBAAiB,CAAC,KAAK,EAAE,GAAG,SAAS,MAAM,KAAK,GAAG,MAAM,KAAK,IAAI;IACnE,QAAQ,EAAE,WAAW,IAAI,GAAG,GAAG,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC;CACxG,CAAC,GAAG,CAAC,CAAC;AAEP,KAAK,gBAAgB,GAAG,mBAAmB,GAAG,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK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U,GAAG,UAAU,GAAG,OAAO,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,KAAK,oBAAoB,CAAC,MAAM,SAAS,eAAe,IAAI;IACxD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;AA8RF,wBAAgB,qBAAqB,CAAC,MAAM,SAAS,eAAe,EAChE,KAAK,EAAE,oBAAoB,CAAC,MAAM,CAAC,GACpC,qBAAqB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAS5D;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,SAAS,eAAe,EACvE,KAAK,EAAE,oBAAoB,CAAC,MAAM,CAAC,GACpC,sBAAsB,CAAC,MAAM,CAAC,CAYhC"}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
function assertNonEmptyItems(items, message) {
|
|
2
|
-
if (items.length === 0) {
|
|
3
|
-
throw new TypeError(message);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
function isExactThrownMatcher(matcher) {
|
|
7
|
-
return Object.hasOwn(matcher, 'exact');
|
|
8
|
-
}
|
|
9
|
-
function expectedAction(kind) {
|
|
10
|
-
return kind === 'throws' ? 'throw' : 'reject';
|
|
11
|
-
}
|
|
12
|
-
function missingThrownValueChild(input) {
|
|
13
|
-
return {
|
|
14
|
-
actual: false,
|
|
15
|
-
check: 'true',
|
|
16
|
-
location: input.location,
|
|
17
|
-
message: `Expected function to ${expectedAction(input.kind)}.`,
|
|
18
|
-
source: input.source
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function expectedMatcherChild(input) {
|
|
22
|
-
if (input.check === 'equal') {
|
|
23
|
-
return {
|
|
24
|
-
actual: input.actual,
|
|
25
|
-
check: input.check,
|
|
26
|
-
expected: input.expected,
|
|
27
|
-
location: input.location,
|
|
28
|
-
message: input.message,
|
|
29
|
-
source: input.source
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
actual: input.actual,
|
|
34
|
-
check: input.check,
|
|
35
|
-
expected: input.expected,
|
|
36
|
-
location: input.location,
|
|
37
|
-
message: input.message,
|
|
38
|
-
source: input.source
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function matchMatcherChild(input) {
|
|
42
|
-
return {
|
|
43
|
-
actual: input.actual,
|
|
44
|
-
check: input.check,
|
|
45
|
-
location: input.location,
|
|
46
|
-
message: input.message,
|
|
47
|
-
pattern: input.pattern,
|
|
48
|
-
source: input.source
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function errorCode(error) {
|
|
52
|
-
return Reflect.get(error, 'code');
|
|
53
|
-
}
|
|
54
|
-
function matcherHas(matcher, key) {
|
|
55
|
-
return Object.hasOwn(matcher, key);
|
|
56
|
-
}
|
|
57
|
-
function errorInstanceChild(input, value, label) {
|
|
58
|
-
return expectedMatcherChild({
|
|
59
|
-
actual: value,
|
|
60
|
-
check: 'instance-of',
|
|
61
|
-
expected: Error,
|
|
62
|
-
location: input.location,
|
|
63
|
-
message: `Expected ${label} to be an Error.`,
|
|
64
|
-
source: input.source
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function typeMatcherChildren(input, matcher, value, label) {
|
|
68
|
-
return matcherHas(matcher, 'type')
|
|
69
|
-
? [
|
|
70
|
-
expectedMatcherChild({
|
|
71
|
-
actual: value,
|
|
72
|
-
check: 'instance-of',
|
|
73
|
-
expected: matcher.type,
|
|
74
|
-
location: input.location,
|
|
75
|
-
message: `Expected ${label} to be an instance of the constructor.`,
|
|
76
|
-
source: input.source
|
|
77
|
-
})
|
|
78
|
-
]
|
|
79
|
-
: [];
|
|
80
|
-
}
|
|
81
|
-
function messageMatcherChildren(input, matcher, value, label) {
|
|
82
|
-
if (matcherHas(matcher, 'message')) {
|
|
83
|
-
return matcher.message instanceof RegExp
|
|
84
|
-
? [
|
|
85
|
-
matchMatcherChild({
|
|
86
|
-
actual: value.message,
|
|
87
|
-
check: 'match',
|
|
88
|
-
location: input.location,
|
|
89
|
-
message: `Expected ${label} message to match the pattern.`,
|
|
90
|
-
pattern: matcher.message,
|
|
91
|
-
source: input.source
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
: [
|
|
95
|
-
expectedMatcherChild({
|
|
96
|
-
actual: value.message,
|
|
97
|
-
check: 'equal',
|
|
98
|
-
expected: matcher.message,
|
|
99
|
-
location: input.location,
|
|
100
|
-
message: `Expected ${label} message to equal the string.`,
|
|
101
|
-
source: input.source
|
|
102
|
-
})
|
|
103
|
-
];
|
|
104
|
-
}
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
function codeMatcherChildren(input, matcher, value, label) {
|
|
108
|
-
return matcherHas(matcher, 'code')
|
|
109
|
-
? [
|
|
110
|
-
expectedMatcherChild({
|
|
111
|
-
actual: errorCode(value),
|
|
112
|
-
check: 'equal',
|
|
113
|
-
expected: matcher.code,
|
|
114
|
-
location: input.location,
|
|
115
|
-
message: `Expected ${label} code to equal the string.`,
|
|
116
|
-
source: input.source
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
: [];
|
|
120
|
-
}
|
|
121
|
-
function nameMatcherChildren(input, matcher, value, label) {
|
|
122
|
-
return matcherHas(matcher, 'name')
|
|
123
|
-
? [
|
|
124
|
-
expectedMatcherChild({
|
|
125
|
-
actual: value.name,
|
|
126
|
-
check: 'equal',
|
|
127
|
-
expected: matcher.name,
|
|
128
|
-
location: input.location,
|
|
129
|
-
message: `Expected ${label} name to equal the string.`,
|
|
130
|
-
source: input.source
|
|
131
|
-
})
|
|
132
|
-
]
|
|
133
|
-
: [];
|
|
134
|
-
}
|
|
135
|
-
function causeMatcherChildren(input) {
|
|
136
|
-
return matcherHas(input.matcher, 'cause')
|
|
137
|
-
? input.childrenForMatcher(input.assertion, input.matcher.cause, input.value.cause, `${input.label} cause`)
|
|
138
|
-
: [];
|
|
139
|
-
}
|
|
140
|
-
function structuredErrorChildren(input) {
|
|
141
|
-
if (!(input.value instanceof Error)) {
|
|
142
|
-
return [errorInstanceChild(input.assertion, input.value, input.label)];
|
|
143
|
-
}
|
|
144
|
-
const errorInput = {
|
|
145
|
-
...input,
|
|
146
|
-
value: input.value
|
|
147
|
-
};
|
|
148
|
-
return [
|
|
149
|
-
errorInstanceChild(input.assertion, input.value, input.label),
|
|
150
|
-
...typeMatcherChildren(input.assertion, input.matcher, input.value, input.label),
|
|
151
|
-
...messageMatcherChildren(input.assertion, input.matcher, input.value, input.label),
|
|
152
|
-
...codeMatcherChildren(input.assertion, input.matcher, input.value, input.label),
|
|
153
|
-
...nameMatcherChildren(input.assertion, input.matcher, input.value, input.label),
|
|
154
|
-
...causeMatcherChildren(errorInput)
|
|
155
|
-
];
|
|
156
|
-
}
|
|
157
|
-
const matcherChildren = function createMatcherChildren(input, matcher, value, label) {
|
|
158
|
-
return isExactThrownMatcher(matcher)
|
|
159
|
-
? [
|
|
160
|
-
expectedMatcherChild({
|
|
161
|
-
actual: value,
|
|
162
|
-
check: 'equal',
|
|
163
|
-
expected: matcher.exact,
|
|
164
|
-
location: input.location,
|
|
165
|
-
message: `Expected ${label} to equal the exact matcher.`,
|
|
166
|
-
source: input.source
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
: structuredErrorChildren({
|
|
170
|
-
assertion: input,
|
|
171
|
-
childrenForMatcher: createMatcherChildren,
|
|
172
|
-
label,
|
|
173
|
-
matcher,
|
|
174
|
-
value
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
export function thrownMatcherChildren(input) {
|
|
178
|
-
const expectedStatus = input.kind === 'throws' ? 'threw' : 'rejected';
|
|
179
|
-
const children = input.observation.status === expectedStatus
|
|
180
|
-
? matcherChildren(input, input.matcher, input.observation.value, 'thrown value')
|
|
181
|
-
: [missingThrownValueChild(input)];
|
|
182
|
-
assertNonEmptyItems(children, 'Expected thrown matcher assertion to create children.');
|
|
183
|
-
return children;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
//# sourceMappingURL=thrown-matcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thrown-matcher.js","sourceRoot":"","sources":["../../../../source/assertion-protocol/thrown-matcher.ts"],"names":[],"mappings":"AAkHA,SAAS,mBAAmB,CACxB,KAAsB,EACtB,OAAe;IAEf,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;AACL;AAEA,SAAS,oBAAoB,CAAC,OAAsB;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3C;AAEA,SAAS,cAAc,CAAC,IAAyB;IAC7C,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;AAClD;AAEA,SAAS,uBAAuB,CAC5B,KAAmC;IAEnC,OAAO;QACH,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO,EAAE,wBAAwB,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;QAC9D,MAAM,EAAE,KAAK,CAAC,MAAM;KACvB,CAAC;AACN;AAEA,SAAS,oBAAoB,CACzB,KAAiC;IAEjC,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO;YACH,MAAM,EAAE,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EAAE,KAAK,CAAC,MAAM;aACvB,CAAC;SACL;QACD,CAAC,CAAC,uBAAuB,CAAC;YACtB,SAAS,EAAE,KAAK;YAChB,kBAAkB,EAAE,qBAAqB;YACzC,KAAK;YACL,OAAO;YACP,KAAK;SACR,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,qBAAqB,CACjC,KAAmC;IAEnC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;IACtE,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,KAAK,cAAc;QACxD,CAAC,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC;QAChF,CAAC,CAAC,CAAE,uBAAuB,CAAC,KAAK,CAAC,CAAE,CAAC;IAEzC,mBAAmB,CAAC,QAAQ,EAAE,uDAAuD,CAAC,CAAC;IAEvF,OAAO,QAAQ,CAAC;AACpB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Diff, DiffPathSegment } from '../diff/diff-shape.ts';
|
|
2
|
-
import { type SerializedValue } from './serialized-value.ts';
|
|
3
|
-
export type ComparisonResult = {
|
|
4
|
-
readonly actual: SerializedValue;
|
|
5
|
-
readonly diff: Diff | null;
|
|
6
|
-
readonly expected: SerializedValue;
|
|
7
|
-
readonly passed: boolean;
|
|
8
|
-
readonly path: readonly DiffPathSegment[];
|
|
9
|
-
};
|
|
10
|
-
type ComparisonResultInput = {
|
|
11
|
-
readonly actual: unknown;
|
|
12
|
-
readonly diff: Diff | null;
|
|
13
|
-
readonly expected: unknown;
|
|
14
|
-
readonly passed: boolean;
|
|
15
|
-
readonly path: readonly DiffPathSegment[];
|
|
16
|
-
};
|
|
17
|
-
export declare const emptyPath: readonly DiffPathSegment[];
|
|
18
|
-
export declare function firstDiffPath(diff: Diff | null): readonly DiffPathSegment[];
|
|
19
|
-
export declare function comparisonResult(input: ComparisonResultInput): ComparisonResult;
|
|
20
|
-
export declare function passedResult(actual: unknown, expected: unknown): ComparisonResult;
|
|
21
|
-
export declare function failedResult(actual: unknown, expected: unknown, diff: Diff | null): ComparisonResult;
|
|
22
|
-
export declare function serializedValueDiff(actual: unknown, expected: unknown): Diff;
|
|
23
|
-
export declare function valueMismatch(actual: unknown, expected: unknown): ComparisonResult;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=comparison-result.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comparison-result.d.ts","sourceRoot":"","sources":["../../../../source/compare/comparison-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,IAAI,EACJ,eAAe,EAIlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C,CAAC;AAEF,KAAK,qBAAqB,GAAG;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,eAAe,EAAO,CAAC;AAoBxD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,eAAe,EAAE,CAQ3E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CAQ/E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAEjF;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,gBAAgB,CAEpG;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAM5E;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAElF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type ComparisonState = {
|
|
2
|
-
readonly actualToExpected: WeakMap<WeakKey, WeakKey>;
|
|
3
|
-
readonly expectedToActual: WeakMap<WeakKey, WeakKey>;
|
|
4
|
-
};
|
|
5
|
-
export declare function createComparisonState(): ComparisonState;
|
|
6
|
-
export declare function objectPairStatus(actual: WeakKey, expected: WeakKey, state: ComparisonState): 'new' | 'seen' | 'topology-mismatch';
|
|
7
|
-
//# sourceMappingURL=comparison-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comparison-state.d.ts","sourceRoot":"","sources":["../../../../source/compare/comparison-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;CACxD,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,eAAe,CAKvD;AAED,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,eAAe,GACvB,KAAK,GAAG,MAAM,GAAG,mBAAmB,CAgBtC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function createComparisonState() {
|
|
2
|
-
return {
|
|
3
|
-
actualToExpected: new WeakMap(),
|
|
4
|
-
expectedToActual: new WeakMap()
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export function objectPairStatus(actual, expected, state) {
|
|
8
|
-
const previousExpected = state.actualToExpected.get(actual);
|
|
9
|
-
const previousActual = state.expectedToActual.get(expected);
|
|
10
|
-
if (previousExpected === expected && previousActual === actual) {
|
|
11
|
-
return 'seen';
|
|
12
|
-
}
|
|
13
|
-
if (previousExpected !== undefined || previousActual !== undefined) {
|
|
14
|
-
return 'topology-mismatch';
|
|
15
|
-
}
|
|
16
|
-
state.actualToExpected.set(actual, expected);
|
|
17
|
-
state.expectedToActual.set(expected, actual);
|
|
18
|
-
return 'new';
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=comparison-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comparison-state.js","sourceRoot":"","sources":["../../../../source/compare/comparison-state.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,qBAAqB;IACjC,OAAO;QACH,gBAAgB,EAAE,IAAI,OAAO,EAAoB;QACjD,gBAAgB,EAAE,IAAI,OAAO,EAAoB;KACpD,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC5B,MAAe,EACf,QAAiB,EACjB,KAAsB;IAEtB,MAAM,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE5D,IAAI,gBAAgB,KAAK,QAAQ,IAAI,cAAc,KAAK,MAAM,EAAE,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,IAAI,gBAAgB,KAAK,SAAS,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjE,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE7C,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
package/compare/comparison.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Diff } from '../diff/diff-shape.ts';
|
|
2
|
-
import { type ComparisonResult as StructuredComparisonResult } from './comparison-result.ts';
|
|
3
|
-
export type ComparisonResult = StructuredComparisonResult;
|
|
4
|
-
export declare const serializedValueDiff: (actual: unknown, expected: unknown) => Diff;
|
|
5
|
-
export declare function compareEqualValues(actual: unknown, expected: unknown): ComparisonResult;
|
|
6
|
-
export declare function compareStringEquality(actual: string, expected: string): ComparisonResult;
|
|
7
|
-
export declare function compareDeepValues(actual: unknown, expected: unknown): ComparisonResult;
|
|
8
|
-
export declare function comparePartialValue(actual: unknown, expected: unknown): ComparisonResult;
|
|
9
|
-
export declare function compareArrayContainsPartial(actual: unknown, expected: unknown): ComparisonResult;
|
|
10
|
-
export declare function compareMembersPartialDeepEqual(actual: unknown, expected: unknown): ComparisonResult;
|
|
11
|
-
export declare function serializedOutcome(actual: unknown, expected: unknown, passed: boolean): ComparisonResult;
|
|
12
|
-
//# sourceMappingURL=comparison.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comparison.d.ts","sourceRoot":"","sources":["../../../../source/compare/comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAOH,KAAK,gBAAgB,IAAI,0BAA0B,EACtD,MAAM,wBAAwB,CAAC;AAKhC,MAAM,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAE1D,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAgC,CAAC;AAE3G,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAEvF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAWxF;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAQtF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAQxF;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAoBhG;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAsBnG;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,gBAAgB,CAEvG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type ByteSource } from './value-classification.ts';
|
|
2
|
-
type BinaryReference = ArrayBuffer | ArrayBufferView;
|
|
3
|
-
type BuiltInReference = Date | Error | Promise<unknown> | RegExp;
|
|
4
|
-
type CollectionReference = ReadonlyMap<unknown, unknown> | ReadonlySet<unknown>;
|
|
5
|
-
type WeakCollectionReference = WeakMap<Record<string, unknown>, unknown> | WeakSet<Record<string, unknown>>;
|
|
6
|
-
type StrongReference = BinaryReference | BuiltInReference | CollectionReference;
|
|
7
|
-
type ReferenceValue = Readonly<Record<string, unknown>> | StrongReference | WeakCollectionReference;
|
|
8
|
-
export type RawProperty = {
|
|
9
|
-
readonly key: PropertyKey;
|
|
10
|
-
readonly value: unknown;
|
|
11
|
-
};
|
|
12
|
-
export type RawMapEntry = {
|
|
13
|
-
readonly key: unknown;
|
|
14
|
-
readonly value: unknown;
|
|
15
|
-
};
|
|
16
|
-
export declare function sortedKeys(value: ReferenceValue): readonly PropertyKey[] | null;
|
|
17
|
-
export declare function rawProperty(value: ReferenceValue, key: PropertyKey): RawProperty;
|
|
18
|
-
export declare function bytesFrom(value: ByteSource): readonly number[];
|
|
19
|
-
export declare function mapEntries(value: ReadonlyMap<unknown, unknown>): readonly RawMapEntry[];
|
|
20
|
-
export declare function setValues(value: ReadonlySet<unknown>): readonly unknown[];
|
|
21
|
-
export declare function compareExactly(actual: unknown, expected: unknown): boolean;
|
|
22
|
-
export declare function comparePartially(actual: unknown, expected: unknown): boolean;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=raw-comparison.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raw-comparison.d.ts","sourceRoot":"","sources":["../../../../source/compare/raw-comparison.ts"],"names":[],"mappings":"AACA,OAAO,EAWH,KAAK,UAAU,EAClB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,eAAe,GAAG,WAAW,GAAG,eAAe,CAAC;AACrD,KAAK,gBAAgB,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;AACjE,KAAK,mBAAmB,GAAG,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAChF,KAAK,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5G,KAAK,eAAe,GAAG,eAAe,GAAG,gBAAgB,GAA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