@overkill-dev/run 0.0.1 → 0.0.2

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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/assertion-protocol/assertion-evaluation.d.ts +13 -0
  3. package/assertion-protocol/assertion-evaluation.d.ts.map +1 -0
  4. package/assertion-protocol/assertion-node-shape.d.ts +71 -0
  5. package/assertion-protocol/assertion-node-shape.d.ts.map +1 -0
  6. package/assertion-protocol/assertion-node.d.ts +97 -0
  7. package/assertion-protocol/assertion-node.d.ts.map +1 -0
  8. package/assertion-protocol/assertion-reference.d.ts +73 -0
  9. package/assertion-protocol/assertion-reference.d.ts.map +1 -0
  10. package/assertion-protocol/assertions/boolean.d.ts +11 -0
  11. package/assertion-protocol/assertions/boolean.d.ts.map +1 -0
  12. package/assertion-protocol/assertions/collection.d.ts +22 -0
  13. package/assertion-protocol/assertions/collection.d.ts.map +1 -0
  14. package/assertion-protocol/assertions/equality.d.ts +17 -0
  15. package/assertion-protocol/assertions/equality.d.ts.map +1 -0
  16. package/assertion-protocol/assertions/fail.d.ts +13 -0
  17. package/assertion-protocol/assertions/fail.d.ts.map +1 -0
  18. package/assertion-protocol/assertions/numeric.d.ts +29 -0
  19. package/assertion-protocol/assertions/numeric.d.ts.map +1 -0
  20. package/assertion-protocol/assertions/partial.d.ts +14 -0
  21. package/assertion-protocol/assertions/partial.d.ts.map +1 -0
  22. package/assertion-protocol/assertions/presence.d.ts +17 -0
  23. package/assertion-protocol/assertions/presence.d.ts.map +1 -0
  24. package/assertion-protocol/assertions/string.d.ts +28 -0
  25. package/assertion-protocol/assertions/string.d.ts.map +1 -0
  26. package/assertion-protocol/assertions/type-shape.d.ts +42 -0
  27. package/assertion-protocol/assertions/type-shape.d.ts.map +1 -0
  28. package/assertion-protocol/evaluation.d.ts +32 -0
  29. package/assertion-protocol/evaluation.d.ts.map +1 -0
  30. package/assertion-protocol/thrown-error-record.d.ts +8 -0
  31. package/assertion-protocol/thrown-error-record.d.ts.map +1 -0
  32. package/assertion-protocol/thrown-matcher.d.ts +51 -0
  33. package/assertion-protocol/thrown-matcher.d.ts.map +1 -0
  34. package/compare/comparison-result.d.ts +25 -0
  35. package/compare/comparison-result.d.ts.map +1 -0
  36. package/compare/comparison.d.ts +12 -0
  37. package/compare/comparison.d.ts.map +1 -0
  38. package/compare/serialized-value-shape.d.ts +143 -0
  39. package/compare/serialized-value-shape.d.ts.map +1 -0
  40. package/compare/serialized-value.d.ts +11 -0
  41. package/compare/serialized-value.d.ts.map +1 -0
  42. package/diff/diff-shape.d.ts +117 -0
  43. package/diff/diff-shape.d.ts.map +1 -0
  44. package/engine/assertion-facade.d.ts +50 -0
  45. package/engine/assertion-facade.d.ts.map +1 -0
  46. package/engine/custom-assertion-recording.d.ts +33 -0
  47. package/engine/custom-assertion-recording.d.ts.map +1 -0
  48. package/engine/identity.d.ts +12 -0
  49. package/engine/identity.d.ts.map +1 -0
  50. package/engine/reporter.d.ts +103 -0
  51. package/engine/reporter.d.ts.map +1 -0
  52. package/engine/require-assertion-facade.d.ts +21 -0
  53. package/engine/require-assertion-facade.d.ts.map +1 -0
  54. package/engine/run-result.d.ts +110 -0
  55. package/engine/run-result.d.ts.map +1 -0
  56. package/engine/test-node.d.ts +88 -0
  57. package/engine/test-node.d.ts.map +1 -0
  58. package/engine/test-plan.d.ts +20 -0
  59. package/engine/test-plan.d.ts.map +1 -0
  60. package/package.json +33 -6
  61. package/packages/engine/assertion-protocol.entry-point.d.ts +9 -0
  62. package/packages/engine/assertion-protocol.entry-point.d.ts.map +1 -0
  63. package/packages/run/run.entry-point.d.ts +3 -0
  64. package/packages/run/run.entry-point.d.ts.map +1 -0
  65. package/packages/run/run.entry-point.js +2 -0
  66. package/packages/run/run.entry-point.js.map +1 -0
  67. package/readme.md +9 -5
  68. package/run/run.d.ts +65 -0
  69. package/run/run.d.ts.map +1 -0
  70. package/run/run.js +12 -0
  71. package/run/run.js.map +1 -0
  72. package/sbom.cdx.json +50 -0
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,51 @@
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
@@ -0,0 +1 @@
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,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,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"}
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
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,e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+1,12 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,143 @@
1
+ type CollectionTruncationReason = 'array-entries' | 'object-entries';
2
+ type ValueTruncationReason = 'depth' | 'serialized-bytes' | 'string-bytes' | 'visited-nodes';
3
+ type SerializationTruncationReason = CollectionTruncationReason | ValueTruncationReason;
4
+ export type SerializationTruncation = {
5
+ readonly budget: number;
6
+ readonly reason: SerializationTruncationReason;
7
+ };
8
+ type SerializedStringPropertyKey = {
9
+ readonly kind: 'string';
10
+ readonly value: string;
11
+ };
12
+ type SerializedSymbolPropertyKey = {
13
+ readonly kind: 'symbol';
14
+ readonly value: string;
15
+ };
16
+ export type SerializedPropertyKey = SerializedStringPropertyKey | SerializedSymbolPropertyKey;
17
+ export type SerializedProperty = {
18
+ readonly key: SerializedPropertyKey;
19
+ readonly value: SerializedValue;
20
+ };
21
+ export type SerializedMapEntry = {
22
+ readonly key: SerializedValue;
23
+ readonly value: SerializedValue;
24
+ };
25
+ export type SerializedBytes = {
26
+ readonly bytes: readonly number[];
27
+ readonly byteLength: number;
28
+ readonly truncation: SerializationTruncation | null;
29
+ };
30
+ type SerializedObjectValue = {
31
+ readonly constructorName: string;
32
+ readonly entries: readonly SerializedProperty[];
33
+ readonly kind: 'object';
34
+ readonly truncation: SerializationTruncation | null;
35
+ };
36
+ type SerializedErrorValue = {
37
+ readonly entries: readonly SerializedProperty[];
38
+ readonly kind: 'error';
39
+ readonly message: string;
40
+ readonly name: string;
41
+ readonly truncation: SerializationTruncation | null;
42
+ };
43
+ type SerializedArrayValue = {
44
+ readonly entries: readonly SerializedProperty[];
45
+ readonly kind: 'array';
46
+ readonly length: number;
47
+ readonly truncation: SerializationTruncation | null;
48
+ };
49
+ type SerializedMapValue = {
50
+ readonly entries: readonly SerializedMapEntry[];
51
+ readonly kind: 'map';
52
+ readonly size: number;
53
+ readonly truncation: SerializationTruncation | null;
54
+ };
55
+ type SerializedSetValue = {
56
+ readonly kind: 'set';
57
+ readonly size: number;
58
+ readonly truncation: SerializationTruncation | null;
59
+ readonly values: readonly SerializedValue[];
60
+ };
61
+ type SerializedCollectionValue = SerializedArrayValue | SerializedMapValue | SerializedObjectValue | SerializedSetValue;
62
+ type SerializedFunctionValue = {
63
+ readonly id: number;
64
+ readonly kind: 'function';
65
+ readonly name: string | null;
66
+ };
67
+ type SerializedBigIntValue = {
68
+ readonly kind: 'bigint';
69
+ readonly value: string;
70
+ };
71
+ type SerializedBooleanValue = {
72
+ readonly kind: 'boolean';
73
+ readonly value: boolean;
74
+ };
75
+ type SerializedNullValue = {
76
+ readonly kind: 'null';
77
+ };
78
+ type SerializedNumberValue = {
79
+ readonly kind: 'number';
80
+ readonly value: number | '-0' | '-Infinity' | 'Infinity' | 'NaN';
81
+ };
82
+ type SerializedStringValue = {
83
+ readonly kind: 'string';
84
+ readonly truncation: SerializationTruncation | null;
85
+ readonly value: string;
86
+ };
87
+ type SerializedSymbolValue = {
88
+ readonly kind: 'symbol';
89
+ readonly value: string;
90
+ };
91
+ type SerializedUndefinedValue = {
92
+ readonly kind: 'undefined';
93
+ };
94
+ type SerializedNullishValue = SerializedNullValue | SerializedUndefinedValue;
95
+ type SerializedNumericValue = SerializedBigIntValue | SerializedNumberValue;
96
+ type SerializedScalarValue = SerializedBooleanValue | SerializedNullishValue | SerializedNumericValue;
97
+ type SerializedTextValue = SerializedStringValue | SerializedSymbolValue | SerializedUndefinedValue;
98
+ type SerializedPrimitiveValue = SerializedScalarValue | SerializedTextValue;
99
+ type SerializedCircularValue = {
100
+ readonly kind: 'circular';
101
+ readonly reference: number;
102
+ };
103
+ type SerializedDateValue = {
104
+ readonly kind: 'date';
105
+ readonly value: string | null;
106
+ };
107
+ type SerializedOpaqueValue = {
108
+ readonly kind: 'opaque';
109
+ readonly type: 'promise' | 'weak-map' | 'weak-set';
110
+ };
111
+ type SerializedRegExpValue = {
112
+ readonly kind: 'regexp';
113
+ readonly flags: string;
114
+ readonly source: string;
115
+ };
116
+ type SerializedUnavailableValue = {
117
+ readonly kind: 'unavailable';
118
+ readonly reason: string;
119
+ };
120
+ type SerializedBuiltInCoreValue = SerializedCircularValue | SerializedDateValue | SerializedOpaqueValue;
121
+ type SerializedBuiltInValue = SerializedBuiltInCoreValue | SerializedRegExpValue | SerializedUnavailableValue;
122
+ type SerializedTypedArrayValue = SerializedBytes & {
123
+ readonly constructorName: string;
124
+ readonly kind: 'typed-array';
125
+ readonly length: number;
126
+ };
127
+ type SerializedByteViewValue = SerializedBytes & {
128
+ readonly kind: 'array-buffer' | 'data-view';
129
+ };
130
+ type SerializedReferenceValue = SerializedByteViewValue | SerializedCollectionValue | SerializedTypedArrayValue;
131
+ type SerializedRuntimeValue = SerializedBuiltInValue | SerializedErrorValue | SerializedFunctionValue;
132
+ export type SerializedValue = SerializedPrimitiveValue | SerializedReferenceValue | SerializedRuntimeValue;
133
+ export type SerializationBudget = {
134
+ readonly arrayEntries: number;
135
+ readonly depth: number;
136
+ readonly objectEntries: number;
137
+ readonly operandBytes: number;
138
+ readonly stringBytes: number;
139
+ readonly visitedNodes: number;
140
+ };
141
+ export declare const defaultSerializationBudget: SerializationBudget;
142
+ export {};
143
+ //# sourceMappingURL=serialized-value-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialized-value-shape.d.ts","sourceRoot":"","sources":["../../../../source/compare/serialized-value-shape.ts"],"names":[],"mappings":"AAAA,KAAK,0BAA0B,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAErE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AK,wBAAwB,GAAG,uBAAuB,GAAG,yBAAyB,GAAG,yBAAyB,CAAC;AAEhH,KAAK,sBAAsB,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,uBAAuB,CAAC;AAEtG,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,sBAAsB,CAAC;AAE3G,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CACjC,CAAC;AAMF,eAAO,MAAM,0BAA0B,EAAE,mBAOxC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type SerializationBudget as SerializationBudgetShape, type SerializationTruncation as SerializationTruncationShape, type SerializedMapEntry as SerializedMapEntryShape, type SerializedProperty as SerializedPropertyShape, type SerializedPropertyKey as SerializedPropertyKeyShape, type SerializedValue as SerializedValueShape } from './serialized-value-shape.ts';
2
+ export type SerializationTruncation = SerializationTruncationShape;
3
+ export type SerializedPropertyKey = SerializedPropertyKeyShape;
4
+ export type SerializedProperty = SerializedPropertyShape;
5
+ export type SerializedMapEntry = SerializedMapEntryShape;
6
+ export type SerializedValue = SerializedValueShape;
7
+ export type SerializationBudget = SerializationBudgetShape;
8
+ export declare const defaultSerializationBudget: SerializationBudget;
9
+ export declare function serializeValue(value: unknown): SerializedValue;
10
+ export declare function serializeValueWithBudget(value: unknown, budget: SerializationBudget): SerializedValue;
11
+ //# sourceMappingURL=serialized-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialized-value.d.ts","sourceRoot":"","sources":["../../../../source/compare/serialized-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,mBAAmB,IAAI,wBAAwB,EACpD,KAAK,uBAAuB,IAAI,4BAA4B,EAE5D,KAAK,kBAAkB,IAAI,uBAAuB,EAClD,KAAK,kBAAkB,IAAI,uBAAuB,EAClD,KAAK,qBAAqB,IAAI,0BAA0B,EACxD,KAAK,eAAe,IAAI,oBAAoB,EAC/C,MAAM,6BAA6B,CAAC;AAuBrC,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AACnE,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,EAAE,mBAA2C,CAAC;AA+iBrF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAE9D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,GAAG,eAAe,CAErG"}
@@ -0,0 +1,117 @@
1
+ import type { SerializedPropertyKey, SerializedValue } from '../compare/serialized-value.ts';
2
+ type BytePathSegment = {
3
+ readonly kind: 'byte';
4
+ readonly offset: number;
5
+ };
6
+ type IndexPathSegment = {
7
+ readonly index: number;
8
+ readonly kind: 'index';
9
+ };
10
+ type MapPathSegment = {
11
+ readonly key: SerializedValue;
12
+ readonly kind: 'map-key' | 'map-value';
13
+ };
14
+ type PropertyPathSegment = {
15
+ readonly key: SerializedPropertyKey;
16
+ readonly kind: 'property';
17
+ };
18
+ type SetValuePathSegment = {
19
+ readonly kind: 'set-value';
20
+ readonly value: SerializedValue;
21
+ };
22
+ type IndexedPathSegment = BytePathSegment | IndexPathSegment;
23
+ type KeyedPathSegment = MapPathSegment | PropertyPathSegment | SetValuePathSegment;
24
+ export type DiffPathSegment = IndexedPathSegment | KeyedPathSegment;
25
+ type ReplaceOperation = {
26
+ readonly from: SerializedValue;
27
+ readonly operation: 'replace';
28
+ readonly path: readonly DiffPathSegment[];
29
+ readonly to: SerializedValue;
30
+ };
31
+ type AddOperation = {
32
+ readonly operation: 'add';
33
+ readonly path: readonly DiffPathSegment[];
34
+ readonly value: SerializedValue;
35
+ };
36
+ type RemoveOperation = {
37
+ readonly operation: 'remove';
38
+ readonly path: readonly DiffPathSegment[];
39
+ readonly value: SerializedValue;
40
+ };
41
+ type MissingPropertyOperation = {
42
+ readonly operation: 'missing-property';
43
+ readonly path: readonly DiffPathSegment[];
44
+ readonly value: SerializedValue;
45
+ };
46
+ type MissingIndexOperation = {
47
+ readonly index: number;
48
+ readonly operation: 'missing-index';
49
+ readonly value: SerializedValue;
50
+ };
51
+ type MissingArrayMemberOperation = {
52
+ readonly operation: 'missing-member';
53
+ readonly value: SerializedValue;
54
+ };
55
+ type MissingEntryOperation = {
56
+ readonly key: SerializedValue;
57
+ readonly operation: 'missing-entry';
58
+ readonly value: SerializedValue;
59
+ };
60
+ type MissingMemberOperation = {
61
+ readonly operation: 'missing-member';
62
+ readonly value: SerializedValue;
63
+ };
64
+ type ArrayPresenceOperation = MissingArrayMemberOperation | MissingIndexOperation;
65
+ export type ArrayDiffOperation = AddOperation | ArrayPresenceOperation | RemoveOperation | ReplaceOperation;
66
+ export type MapDiffOperation = AddOperation | MissingEntryOperation | RemoveOperation | ReplaceOperation;
67
+ export type ObjectDiffOperation = AddOperation | MissingPropertyOperation | RemoveOperation | ReplaceOperation;
68
+ export type SetDiffOperation = AddOperation | MissingMemberOperation | RemoveOperation;
69
+ export type ByteDiffRange = {
70
+ readonly actual: readonly number[];
71
+ readonly expected: readonly number[];
72
+ readonly offset: number;
73
+ };
74
+ export type Hunk = {
75
+ readonly actualStart: number;
76
+ readonly added: readonly string[];
77
+ readonly expectedStart: number;
78
+ readonly removed: readonly string[];
79
+ };
80
+ type ArrayDiff = {
81
+ readonly kind: 'array';
82
+ readonly operations: readonly ArrayDiffOperation[];
83
+ };
84
+ type BinaryDiff = {
85
+ readonly actualHash: string;
86
+ readonly actualSize: number;
87
+ readonly expectedHash: string;
88
+ readonly expectedSize: number;
89
+ readonly kind: 'binary';
90
+ readonly ranges: readonly ByteDiffRange[];
91
+ };
92
+ type MapDiff = {
93
+ readonly kind: 'map';
94
+ readonly operations: readonly MapDiffOperation[];
95
+ };
96
+ type ObjectDiff = {
97
+ readonly kind: 'object';
98
+ readonly operations: readonly ObjectDiffOperation[];
99
+ };
100
+ type SetDiff = {
101
+ readonly kind: 'set';
102
+ readonly operations: readonly SetDiffOperation[];
103
+ };
104
+ type StringDiff = {
105
+ readonly actual: string;
106
+ readonly expected: string;
107
+ readonly hunks: readonly Hunk[];
108
+ readonly kind: 'string';
109
+ };
110
+ type ValueDiff = {
111
+ readonly actual: SerializedValue;
112
+ readonly expected: SerializedValue;
113
+ readonly kind: 'value';
114
+ };
115
+ export type Diff = ArrayDiff | BinaryDiff | MapDiff | ObjectDiff | SetDiff | StringDiff | ValueDiff;
116
+ export {};
117
+ //# sourceMappingURL=diff-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-shape.d.ts","sourceRoot":"","sources":["../../../../source/diff/diff-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE7F,KAAK,eAAe,GAAG;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,KAAK,cAAc,GAAG;IAClB,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,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C;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CAC3B,CAAC;AAEF,KAAK,SAAS,GAAG;IACb,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { CompositeAssertionReference, CompositeAssertionReturn, NarrowingCompositeAssertionReference } from '../packages/engine/assertion-protocol.entry-point.ts';
2
+ import type { AssertionOptions, DeepComparable, InstanceConstructor, ResolvableSourceLocation } from '../assertion-protocol/assertion-node-shape.ts';
3
+ import { type SynchronousCallback, type ThrownMatcher } from '../assertion-protocol/thrown-matcher.ts';
4
+ import { type AssertAssertionSink } from './custom-assertion-recording.ts';
5
+ export type AssertAssertionFacade = {
6
+ <Arguments extends readonly unknown[], Result extends Promise<CompositeAssertionReturn<'assert'>>>(reference: CompositeAssertionReference<Arguments, Result>, ...parameters: Arguments): Promise<void>;
7
+ <Arguments extends readonly unknown[], Result extends CompositeAssertionReturn<'assert'>>(reference: CompositeAssertionReference<Arguments, Result>, ...parameters: Arguments): void;
8
+ <Actual, Narrowed extends Actual, Arguments extends readonly unknown[]>(reference: NarrowingCompositeAssertionReference<Actual, Narrowed, Arguments>, actual: Actual, ...parameters: Arguments): void;
9
+ readonly annotated: (message: string) => AssertAssertionFacade;
10
+ readonly array: (actual: unknown, options?: AssertionOptions) => void;
11
+ readonly arrayContainsPartial: <Actual, Expected>(actual: readonly DeepComparable<Actual>[], expectedSubset: DeepComparable<Expected>, options?: AssertionOptions) => void;
12
+ readonly between: (actual: number, minimum: number, maximum: number, options?: AssertionOptions) => void;
13
+ readonly boolean: (actual: unknown, options?: AssertionOptions) => void;
14
+ readonly deepEqual: <Actual, Expected>(actual: DeepComparable<Actual>, expected: DeepComparable<Expected>, options?: AssertionOptions) => void;
15
+ readonly defined: (actual: unknown, options?: AssertionOptions) => void;
16
+ readonly empty: (actual: unknown, options?: AssertionOptions) => void;
17
+ readonly endsWith: (actual: string, expected: string, options?: AssertionOptions) => void;
18
+ readonly equal: (actual: unknown, expected: unknown, options?: AssertionOptions) => void;
19
+ readonly fail: (options?: AssertionOptions) => void;
20
+ readonly false: (actual: unknown, options?: AssertionOptions) => void;
21
+ readonly function: (actual: unknown, options?: AssertionOptions) => void;
22
+ readonly greaterThan: (actual: number, expected: number, options?: AssertionOptions) => void;
23
+ readonly greaterThanOrEqual: (actual: number, expected: number, options?: AssertionOptions) => void;
24
+ readonly hasProperty: (actual: unknown, key: PropertyKey, options?: AssertionOptions) => void;
25
+ readonly includes: (actual: string, expected: string, options?: AssertionOptions) => void;
26
+ readonly instanceOf: (actual: unknown, expected: InstanceConstructor, options?: AssertionOptions) => void;
27
+ readonly length: (actual: unknown, expectedLength: number, options?: AssertionOptions) => void;
28
+ readonly lessThan: (actual: number, expected: number, options?: AssertionOptions) => void;
29
+ readonly lessThanOrEqual: (actual: number, expected: number, options?: AssertionOptions) => void;
30
+ readonly match: (actual: string, pattern: RegExp, options?: AssertionOptions) => void;
31
+ readonly membersPartialDeepEqual: <Actual, Expected>(actual: readonly DeepComparable<Actual>[], expectedMembers: readonly DeepComparable<Expected>[], options?: AssertionOptions) => void;
32
+ readonly notDeepEqual: <Actual, Expected>(actual: DeepComparable<Actual>, expected: DeepComparable<Expected>, options?: AssertionOptions) => void;
33
+ readonly notEmpty: (actual: unknown, options?: AssertionOptions) => void;
34
+ readonly notEqual: (actual: unknown, expected: unknown, options?: AssertionOptions) => void;
35
+ readonly notMatch: (actual: string, pattern: RegExp, options?: AssertionOptions) => void;
36
+ readonly notNull: (actual: unknown, options?: AssertionOptions) => void;
37
+ readonly null: (actual: unknown, options?: AssertionOptions) => void;
38
+ readonly number: (actual: unknown, options?: AssertionOptions) => void;
39
+ readonly object: (actual: unknown, options?: AssertionOptions) => void;
40
+ readonly partialDeepEqual: <Actual, Expected>(actual: DeepComparable<Actual>, expectedSubset: DeepComparable<Expected>, options?: AssertionOptions) => void;
41
+ readonly rejects: (thunk: () => PromiseLike<unknown>, matcher: ThrownMatcher, options?: AssertionOptions) => Promise<void>;
42
+ readonly startsWith: (actual: string, expected: string, options?: AssertionOptions) => void;
43
+ readonly string: (actual: unknown, options?: AssertionOptions) => void;
44
+ readonly throws: <Body extends () => unknown>(body: SynchronousCallback<Body>, matcher: ThrownMatcher, options?: AssertionOptions) => void;
45
+ readonly true: (actual: unknown, options?: AssertionOptions) => void;
46
+ readonly undefined: (actual: unknown, options?: AssertionOptions) => void;
47
+ };
48
+ export declare function createRecordingAssertFacadeWithLocation(sink: AssertAssertionSink, annotation: string | null, captureLocation: () => ResolvableSourceLocation): AssertAssertionFacade;
49
+ export declare function createRecordingAssertFacade(sink: AssertAssertionSink, annotation: string | null): AssertAssertionFacade;
50
+ //# sourceMappingURL=assertion-facade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-facade.d.ts","sourceRoot":"","sources":["../../../../source/engine/assertion-facade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,wBAAwB,EACxB,oCAAoC,EACvC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EACR,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EAC3B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAEH,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACrB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEH,KAAK,mBAAmB,EAC3B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAChC,CAAC,SAAS,SAAS,SAAS,OAAO,EAAE,EAAE,MAAM,SAAS,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,C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AQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5F,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,MAAM,OAAO,EACxC,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,EAC/B,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAC;IACV,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC7E,CAAC;AA2CF,wBAAgB,uCAAuC,CACnD,IAAI,EAAE,mBAAmB,EACzB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,eAAe,EAAE,MAAM,wBAAwB,GAChD,qBAAqB,CAuYvB;AAED,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,mBAAmB,EACzB,UAAU,EAAE,MAAM,GAAG,IAAI,GAC1B,qBAAqB,CAEvB"}
@@ -0,0 +1,33 @@
1
+ import type { AssertAssertionNode, RequireAssertionNode } from '../assertion-protocol/assertion-node.ts';
2
+ import type { ResolvableSourceLocation } from '../assertion-protocol/assertion-node-shape.ts';
3
+ import type { TestContractFailure } from './run-result.ts';
4
+ type PendingAssertAssertionSink = {
5
+ readonly resolve: (assertion: AssertAssertionNode) => void;
6
+ };
7
+ export type AssertAssertionSink = {
8
+ readonly failContract: (failure: TestContractFailure) => never;
9
+ readonly recordAssert: (assertion: AssertAssertionNode) => void;
10
+ readonly recordPendingAssert: () => PendingAssertAssertionSink;
11
+ };
12
+ export type RequireAssertionSink = {
13
+ readonly failContract: (failure: TestContractFailure) => never;
14
+ readonly recordRequire: (assertion: RequireAssertionNode) => void;
15
+ };
16
+ type AssertReferenceRecordingInput = {
17
+ readonly annotation: string | null;
18
+ readonly location: ResolvableSourceLocation;
19
+ readonly parameters: readonly unknown[];
20
+ readonly reference: unknown;
21
+ readonly sink: AssertAssertionSink;
22
+ };
23
+ type RequireReferenceRecordingInput = {
24
+ readonly annotation: string | null;
25
+ readonly location: ResolvableSourceLocation;
26
+ readonly parameters: readonly unknown[];
27
+ readonly reference: unknown;
28
+ readonly sink: RequireAssertionSink;
29
+ };
30
+ export declare function recordAssertReference(input: AssertReferenceRecordingInput): Promise<void> | void;
31
+ export declare function recordRequireReference(input: RequireReferenceRecordingInput): void;
32
+ export {};
33
+ //# sourceMappingURL=custom-assertion-recording.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-assertion-recording.d.ts","sourceRoot":"","sources":["../../../../source/engine/custom-assertion-recording.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,mBAAmB,EAGnB,oBAAoB,EACvB,MAAM,yCAAyC,CAAC;AAYjD,OAAO,KAAK,EAGR,wBAAwB,EAC3B,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,KAAK,0BAA0B,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,KAAK,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,KAAK,CAAC;IAC/D,QAAQ,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACrE,CAAC;AAqCF,KAAK,6BAA6B,GAAG;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;CACtC,CAAC;AAEF,KAAK,8BAA8B,GAAG;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;CACvC,CAAC;AA+KF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAyBhG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAkBlF"}
@@ -0,0 +1,12 @@
1
+ export type TestId = {
2
+ readonly file: string | null;
3
+ readonly name: string;
4
+ readonly suite: readonly string[];
5
+ };
6
+ export type CaseId = TestId & {
7
+ readonly params: string | null;
8
+ };
9
+ export declare function createCaseId(suite: readonly string[], name: string, params: string | null): CaseId;
10
+ export declare function caseIdentityKey(caseId: CaseId): string;
11
+ export declare function formatCaseId(caseId: CaseId): string;
12
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../source/engine/identity.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOlG;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CASnD"}