@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Overkill contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ import { type ComparisonResult } from '../compare/comparison.ts';
2
+ import type { SerializedValue } from '../compare/serialized-value.ts';
3
+ import type { Diff, DiffPathSegment } from '../diff/diff-shape.ts';
4
+ export type AssertionOutcome = {
5
+ readonly actual: SerializedValue;
6
+ readonly diff: Diff | null;
7
+ readonly expected: SerializedValue;
8
+ readonly passed: boolean;
9
+ readonly path: readonly DiffPathSegment[];
10
+ };
11
+ export declare const assertionOutcome: (actual: unknown, expected: unknown, passed: boolean) => AssertionOutcome;
12
+ export declare function comparisonOutcome(comparison: ComparisonResult): AssertionOutcome;
13
+ //# sourceMappingURL=assertion-evaluation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-evaluation.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/assertion-evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAqB,MAAM,0BAA0B,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEnE,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,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,gBACnE,CAAC;AAEtB,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,GAAG,gBAAgB,CAEhF"}
@@ -0,0 +1,71 @@
1
+ import type { SerializedValue } from '../compare/serialized-value.ts';
2
+ import type { Diff, DiffPathSegment } from '../diff/diff-shape.ts';
3
+ import type { ThrownErrorRecord } from './thrown-error-record.ts';
4
+ export declare const assertionSources: readonly ["assert", "require"];
5
+ export type NonEmptyReadonlyArray<Item> = readonly [Item, ...(readonly Item[])];
6
+ export type AssertionSource = (typeof assertionSources)[number];
7
+ type PrimitiveValueByType = {
8
+ readonly bigint: bigint;
9
+ readonly boolean: boolean;
10
+ readonly null: null;
11
+ readonly number: number;
12
+ readonly string: string;
13
+ readonly symbol: symbol;
14
+ readonly undefined: undefined;
15
+ };
16
+ type PrimitiveValue = PrimitiveValueByType[keyof PrimitiveValueByType];
17
+ type IsAny<Value> = 0 extends Value & 1 ? true : false;
18
+ type DeepComparableKnownValue<Value> = [Extract<Value, PrimitiveValue>] extends [never] ? Value : never;
19
+ type DeepComparableUnknownValue<Value> = unknown extends Value ? unknown : DeepComparableKnownValue<Value>;
20
+ export type DeepComparable<Value = unknown> = IsAny<Value> extends true ? never : DeepComparableUnknownValue<Value>;
21
+ export type AssertionOptions = {
22
+ readonly message: string;
23
+ };
24
+ export type SourceLocation = {
25
+ readonly column: number | null;
26
+ readonly file: string;
27
+ readonly line: number | null;
28
+ };
29
+ export type SourceLocationProvider = () => SourceLocation;
30
+ export type ResolvableSourceLocation = SourceLocation | SourceLocationProvider;
31
+ type FailedCheckBase = {
32
+ readonly actual: SerializedValue;
33
+ readonly diff: Diff | null;
34
+ readonly expected: SerializedValue;
35
+ readonly id: string;
36
+ readonly location: SourceLocation;
37
+ readonly path: readonly DiffPathSegment[];
38
+ readonly source: AssertionSource;
39
+ readonly summary: string;
40
+ };
41
+ export type FailedLeafCheck = FailedCheckBase & {
42
+ readonly kind: 'leaf';
43
+ };
44
+ export type FailedCompositeCheck = FailedCheckBase & {
45
+ readonly children: NonEmptyReadonlyArray<FailedCheck>;
46
+ readonly kind: 'composite';
47
+ };
48
+ export type FailedForeignCheck = FailedCheckBase & {
49
+ readonly error: ThrownErrorRecord;
50
+ readonly kind: 'foreign';
51
+ readonly label: string;
52
+ };
53
+ export type FailedCheck = FailedCompositeCheck | FailedForeignCheck | FailedLeafCheck;
54
+ export type InstanceConstructor = abstract new (...args: never[]) => unknown;
55
+ export type ActualAssertionNode<Source extends AssertionSource, Check extends string> = {
56
+ readonly actual: unknown;
57
+ readonly check: Check;
58
+ readonly location: ResolvableSourceLocation;
59
+ readonly message: string | null;
60
+ readonly source: Source;
61
+ };
62
+ export type ExpectedAssertionNode<Source extends AssertionSource, Check extends string> = {
63
+ readonly actual: unknown;
64
+ readonly check: Check;
65
+ readonly expected: unknown;
66
+ readonly location: ResolvableSourceLocation;
67
+ readonly message: string | null;
68
+ readonly source: Source;
69
+ };
70
+ export {};
71
+ //# sourceMappingURL=assertion-node-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-node-shape.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/assertion-node-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,gBAAgB,gCAAmC,CAAC;AAEjE,MAAM,MAAM,qBAAqB,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;AAEhF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,KAAK,oBAAoB,GAAG;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,KAAK,cAAc,GAAG,oBAAoB,CAAC,MAAM,oBAAoB,CAAC,CAAC;AAEvE,KAAK,KAAK,CAAC,KAAK,IAAI,CAAC,SAAS,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAEvD,KAAK,wBAAwB,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAExG,KA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AssertionNode, type LengthAssertionNode } from './assertions/collection.ts';
3
+ import { type DeepEqualAssertionNode, type EqualAssertionNode, type NotDeepEqualAssertionNode, type NotEqualAssertionNode } from './assertions/equality.ts';
4
+ import { type FailAssertionNode } from './assertions/fail.ts';
5
+ import { type BetweenAssertionNode, type NumericComparisonAssertionNode } from './assertions/numeric.ts';
6
+ import { type ArrayContainsPartialAssertionNode, type MembersPartialDeepEqualAssertionNode, type PartialDeepEqualAssertionNode } from './assertions/partial.ts';
7
+ import { type DefinedAssertionNode, type NotNullAssertionNode, type NullAssertionNode, type UndefinedAssertionNode } from './assertions/presence.ts';
8
+ import { type MatchAssertionNode, type StringContainsAssertionNode } from './assertions/string.ts';
9
+ import { type HasPropertyAssertionNode, type InstanceOfAssertionNode, type TypeAssertionNode } from './assertions/type-shape.ts';
10
+ import type { AssertionSource, NonEmptyReadonlyArray, ResolvableSourceLocation } from './assertion-node-shape.ts';
11
+ type ForeignAssertionErrorRecord = {
12
+ readonly message: string;
13
+ readonly name: string;
14
+ readonly stack: string | null;
15
+ readonly thrown: unknown;
16
+ };
17
+ type RequireAssertionNodeByName = {
18
+ readonly defined: DefinedAssertionNode<'require'>;
19
+ readonly hasProperty: HasPropertyAssertionNode<'require'>;
20
+ readonly instanceOf: InstanceOfAssertionNode<'require'>;
21
+ readonly notNull: NotNullAssertionNode<'require'>;
22
+ readonly null: NullAssertionNode<'require'>;
23
+ readonly type: TypeAssertionNode<'require'>;
24
+ };
25
+ type BuiltInAssertAssertionNodeByName<Source extends AssertionSource> = {
26
+ readonly arrayContainsPartial: ArrayContainsPartialAssertionNode<Source>;
27
+ readonly between: BetweenAssertionNode<Source>;
28
+ readonly deepEqual: DeepEqualAssertionNode<Source>;
29
+ readonly defined: DefinedAssertionNode<Source>;
30
+ readonly emptiness: EmptinessAssertionNode<Source>;
31
+ readonly equal: EqualAssertionNode<Source>;
32
+ readonly fail: FailAssertionNode<Source>;
33
+ readonly false: FalseAssertionNode<Source>;
34
+ readonly hasProperty: HasPropertyNode<Source>;
35
+ readonly instanceOf: InstanceOfAssertionNode<Source>;
36
+ readonly length: LengthAssertionNode<Source>;
37
+ readonly match: MatchAssertionNode<Source>;
38
+ readonly membersPartialDeepEqual: MembersPartialDeepEqualAssertionNode<Source>;
39
+ readonly notDeepEqual: NotDeepEqualAssertionNode<Source>;
40
+ readonly notEqual: NotEqualAssertionNode<Source>;
41
+ readonly notNull: NotNullAssertionNode<Source>;
42
+ readonly null: NullAssertionNode<Source>;
43
+ readonly numericComparison: NumericComparisonAssertionNode<Source>;
44
+ readonly partialDeepEqual: PartialDeepEqualAssertionNode<Source>;
45
+ readonly stringContains: StringContainsAssertionNode<Source>;
46
+ readonly true: TrueAssertionNode<Source>;
47
+ readonly type: TypeAssertionNode<Source>;
48
+ readonly undefined: UndefinedAssertionNode<Source>;
49
+ };
50
+ type HasPropertyNode<Source extends AssertionSource> = HasPropertyAssertionNode<Source>;
51
+ export type BuiltInAssertAssertionNode<Source extends AssertionSource = 'assert'> = BuiltInAssertAssertionNodeByName<Source>[keyof BuiltInAssertAssertionNodeByName<Source>];
52
+ type ForeignAssertionResultByOutcome = {
53
+ readonly fail: {
54
+ readonly error: ForeignAssertionErrorRecord;
55
+ readonly passed: false;
56
+ };
57
+ readonly pass: {
58
+ readonly passed: true;
59
+ };
60
+ };
61
+ export type ForeignAssertionResult = ForeignAssertionResultByOutcome[keyof ForeignAssertionResultByOutcome];
62
+ export type ForeignAssertionNode<Source extends AssertionSource = AssertionSource> = {
63
+ readonly check: 'foreign';
64
+ readonly label: string;
65
+ readonly location: ResolvableSourceLocation;
66
+ readonly message: string | null;
67
+ readonly result: ForeignAssertionResult;
68
+ readonly source: Source;
69
+ readonly summary: string;
70
+ };
71
+ type CompositeAssertionChildNodeByKind<Source extends AssertionSource> = {
72
+ readonly builtIn: BuiltInAssertAssertionNode<Source>;
73
+ readonly foreign: ForeignAssertionNode<Source>;
74
+ };
75
+ export type CompositeAssertionChildNode<Source extends AssertionSource = AssertionSource> = CompositeAssertionChildNodeByKind<Source>[keyof CompositeAssertionChildNodeByKind<Source>];
76
+ export type CompositeAssertionNode<Source extends AssertionSource = AssertionSource> = {
77
+ readonly actual: unknown;
78
+ readonly check: 'composite';
79
+ readonly children: NonEmptyReadonlyArray<CompositeAssertionChildNode<Source>>;
80
+ readonly expected: unknown;
81
+ readonly location: ResolvableSourceLocation;
82
+ readonly message: string | null;
83
+ readonly name: string;
84
+ readonly source: Source;
85
+ readonly summary: string;
86
+ };
87
+ type RequireAssertionNodeByKind = RequireAssertionNodeByName & {
88
+ readonly composite: CompositeAssertionNode<'require'>;
89
+ };
90
+ export type RequireAssertionNode = RequireAssertionNodeByKind[keyof RequireAssertionNodeByKind];
91
+ export type AssertAssertionNode = BuiltInAssertAssertionNode | CompositeAssertionNode<'assert'>;
92
+ export type AssertionNode = AssertAssertionNode | RequireAssertionNode;
93
+ export type AssertionResult = AssertAssertionNode | NonEmptyReadonlyArray<AssertAssertionNode>;
94
+ type SummarizedAssertionNode = AssertionNode | CompositeAssertionChildNode | CompositeAssertionNode;
95
+ export declare function assertionSummary(assertion: SummarizedAssertionNode): string;
96
+ export {};
97
+ //# sourceMappingURL=assertion-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-node.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/assertion-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjH,OAAO,EAEH,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEH,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAEH,KAAK,oBAAoB,EAC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GAAG,mBAAmB,GAAG,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;AAc/F,KAAK,uBAAuB,GAAG,aAAa,GAAG,2BAA2B,GAAG,sBAAsB,CAAC;AAQpG,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,uBAAuB,GAAG,MAAM,CAU3E"}
@@ -0,0 +1,73 @@
1
+ import type { CompositeAssertionChildNode } from './assertion-node.ts';
2
+ import type { AssertionSource, NonEmptyReadonlyArray, ResolvableSourceLocation } from './assertion-node-shape.ts';
3
+ declare const assertionReferenceIdentity: unique symbol;
4
+ declare const assertionReferenceRecordIdentity: unique symbol;
5
+ declare const compositeGroupIdentity: unique symbol;
6
+ export type CompositeAssertionSummaryContext = {
7
+ readonly name: string;
8
+ readonly source: AssertionSource;
9
+ };
10
+ export type CompositeAssertionGroup<Source extends AssertionSource = AssertionSource> = {
11
+ readonly [compositeGroupIdentity]: true;
12
+ readonly children: NonEmptyReadonlyArray<CompositeAssertionChildNode<Source>>;
13
+ };
14
+ type CompositeAssertionReturnByKind<Source extends AssertionSource> = {
15
+ readonly child: CompositeAssertionChildNode<Source>;
16
+ readonly group: CompositeAssertionGroup<Source>;
17
+ };
18
+ export type CompositeAssertionReturn<Source extends AssertionSource = AssertionSource> = CompositeAssertionReturnByKind<Source>[keyof CompositeAssertionReturnByKind<Source>];
19
+ type PromiseCompositeAssertionReturn = Promise<CompositeAssertionReturn<'assert'>>;
20
+ export type AssertCompositeAssertionReturn = CompositeAssertionReturn<'assert'> | PromiseCompositeAssertionReturn;
21
+ type SyncAssertionReturn = ReturnType<() => void>;
22
+ export type CompositeAssertionSummaryFormatter<Arguments extends readonly unknown[]> = (context: CompositeAssertionSummaryContext, ...parameters: Arguments) => string;
23
+ export type NarrowingCompositeAssertionSummaryFormatter<Actual, Arguments extends readonly unknown[]> = (context: CompositeAssertionSummaryContext, actual: Actual, ...parameters: Arguments) => string;
24
+ export type CompositeAssertionRunnerInput<Arguments extends readonly unknown[], Source extends AssertionSource> = {
25
+ readonly location: ResolvableSourceLocation;
26
+ readonly message: string | null;
27
+ readonly parameters: Arguments;
28
+ readonly source: Source;
29
+ };
30
+ export type CompositeAssertionReferenceRecord<Arguments extends readonly unknown[] = readonly unknown[], Result extends AssertCompositeAssertionReturn = AssertCompositeAssertionReturn> = {
31
+ readonly formatSummary: CompositeAssertionSummaryFormatter<Arguments> | null;
32
+ readonly kind: 'composite';
33
+ readonly name: string;
34
+ readonly run: (input: CompositeAssertionRunnerInput<Arguments, 'assert'>) => Result;
35
+ };
36
+ export type NarrowingCompositeAssertionReferenceRecord<Actual = unknown, Narrowed extends Actual = Actual, Arguments extends readonly unknown[] = readonly unknown[]> = {
37
+ readonly formatSummary: NarrowingCompositeAssertionSummaryFormatter<Actual, Arguments> | null;
38
+ readonly kind: 'narrowing-composite';
39
+ readonly name: string;
40
+ readonly narrows: (actual: Actual, ...parameters: Arguments) => actual is Narrowed;
41
+ };
42
+ export type AssertionReferenceRecord = CompositeAssertionReferenceRecord | NarrowingCompositeAssertionReferenceRecord;
43
+ export type CompositeAssertionReference<Arguments extends readonly unknown[] = readonly unknown[], Result extends AssertCompositeAssertionReturn = AssertCompositeAssertionReturn> = {
44
+ readonly [assertionReferenceIdentity]: true;
45
+ readonly [assertionReferenceRecordIdentity]: CompositeAssertionReferenceRecord<Arguments, Result>;
46
+ };
47
+ export type NarrowingCompositeAssertionReference<Actual = unknown, Narrowed extends Actual = Actual, Arguments extends readonly unknown[] = readonly unknown[]> = {
48
+ readonly [assertionReferenceIdentity]: true;
49
+ readonly [assertionReferenceRecordIdentity]: NarrowingCompositeAssertionReferenceRecord<Actual, Narrowed, Arguments>;
50
+ };
51
+ export type AssertionReference = CompositeAssertionReference | NarrowingCompositeAssertionReference;
52
+ type NarrowingReferenceArguments<Actual, Arguments extends readonly unknown[]> = readonly [
53
+ actual: Actual,
54
+ ...parameters: Arguments
55
+ ];
56
+ type ReferenceArguments<Reference> = Reference extends NarrowingCompositeAssertionReference<infer Actual, infer Narrowed, infer Arguments> ? NarrowingReferenceArguments<Actual | Narrowed, Arguments> : never;
57
+ type ReferenceReturn<Result> = Result extends Promise<CompositeAssertionReturn<'assert'>> ? Promise<void> : SyncAssertionReturn;
58
+ type ReadonlyParameters<Arguments extends readonly unknown[]> = readonly [...Arguments];
59
+ export type AssertReferenceArguments<Reference> = Reference extends CompositeAssertionReference<infer Arguments> ? ReadonlyParameters<Arguments> : ReferenceArguments<Reference>;
60
+ export type AssertReferenceReturn<Reference> = Reference extends CompositeAssertionReference<infer Arguments, infer Result> ? Arguments extends readonly unknown[] ? ReferenceReturn<Result> : never : SyncAssertionReturn;
61
+ export declare function createAssertionReferenceRecord<Arguments extends readonly unknown[], Result extends AssertCompositeAssertionReturn>(record: CompositeAssertionReferenceRecord<Arguments, Result>): CompositeAssertionReference<Arguments, Result>;
62
+ export declare function createAssertionReferenceRecord<Actual, Narrowed extends Actual, Arguments extends readonly unknown[]>(record: NarrowingCompositeAssertionReferenceRecord<Actual, Narrowed, Arguments>): NarrowingCompositeAssertionReference<Actual, Narrowed, Arguments>;
63
+ export declare function createCompositeAssertionReferenceRecord<Arguments extends readonly unknown[], Result extends AssertCompositeAssertionReturn>(record: CompositeAssertionReferenceRecord<Arguments, Result>): CompositeAssertionReference<Arguments, Result>;
64
+ export declare function createNarrowingCompositeAssertionReferenceRecord<Actual, Narrowed extends Actual, Arguments extends readonly unknown[]>(record: NarrowingCompositeAssertionReferenceRecord<Actual, Narrowed, Arguments>): NarrowingCompositeAssertionReference<Actual, Narrowed, Arguments>;
65
+ export declare function getAssertionReferenceRecord(reference: AssertionReference): AssertionReferenceRecord;
66
+ export declare function getCompositeAssertionReferenceRecord<Arguments extends readonly unknown[], Result extends AssertCompositeAssertionReturn>(reference: CompositeAssertionReference<Arguments, Result>): CompositeAssertionReferenceRecord<Arguments, Result>;
67
+ export declare function getNarrowingAssertionReferenceRecord<Actual, Narrowed extends Actual, Arguments extends readonly unknown[]>(reference: NarrowingCompositeAssertionReference<Actual, Narrowed, Arguments>): NarrowingCompositeAssertionReferenceRecord<Actual, Narrowed, Arguments>;
68
+ export declare function isAssertionReference(value: unknown): value is AssertionReference;
69
+ export declare function isNarrowingAssertionReference(value: unknown): value is NarrowingCompositeAssertionReference;
70
+ export declare function isCompositeAssertionGroup<Source extends AssertionSource>(value: unknown): value is CompositeAssertionGroup<Source>;
71
+ export declare function createCompositeAssertionGroup<Source extends AssertionSource>(children: NonEmptyReadonlyArray<CompositeAssertionChildNode<Source>>): CompositeAssertionGroup<Source>;
72
+ export {};
73
+ //# sourceMappingURL=assertion-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-reference.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/assertion-reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACR,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,QAAA,MAAM,0BAA0B,EAAE,OAAO,MAAiD,CAAC;AAC3F,QAAA,MAAM,gCAAgC,EAAE,OAAO,MAAuD,CAAC;AACvG,QAAA,MAAM,sBAAsB,EAAE,OAAO,MAA6C,CAAC;AAEnF,MAAM,MAAM,gCAAgC,GAAG;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IACpF,QAAQ,CAAC,CAAC,sBAAsB,CAAC,EAAE,IAAI,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;CACjF,CAAC;AAEF,KAAK,8BAA8B,CAAC,MAAM,SAAS,eAAe,IAAI;IAClE,QAAQ,CAAC,KAAK,EAAE,2BAA2B,CAAC,MAA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,SAAS,CAAC,GAC7E,0CAA0C,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAEzE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oCAAoC,CAE3G;AAED,wBAAgB,yBAAyB,CAAC,MAAM,SAAS,eAAe,EACpE,KAAK,EAAE,OAAO,GACf,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAE1C;AAED,wBAAgB,6BAA6B,CAAC,MAAM,SAAS,eAAe,EACxE,QAAQ,EAAE,qBAAqB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,GACrE,uBAAuB,CAAC,MAAM,CAAC,CAEjC"}
@@ -0,0 +1,11 @@
1
+ import { type AssertionOutcome } from '../assertion-evaluation.ts';
2
+ import type { ActualAssertionNode, AssertionSource } from '../assertion-node-shape.ts';
3
+ export type TrueAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'true'>;
4
+ export type FalseAssertionNode<Source extends AssertionSource = AssertionSource> = ActualAssertionNode<Source, 'false'>;
5
+ export declare const booleanSummaryByCheck: {
6
+ readonly false: "Expected value to be false.";
7
+ readonly true: "Expected value to be true.";
8
+ };
9
+ export declare function evaluateFalse(assertion: FalseAssertionNode): AssertionOutcome;
10
+ export declare function evaluateTrue(assertion: TrueAssertionNode): AssertionOutcome;
11
+ //# sourceMappingURL=boolean.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/boolean.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,iBAAiB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtH,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExH,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,wBAAgB,aAAa,CAAC,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAE7E;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE3E"}
@@ -0,0 +1,22 @@
1
+ import { type AssertionOutcome } from '../assertion-evaluation.ts';
2
+ import type { ActualAssertionNode, AssertionSource, ResolvableSourceLocation } from '../assertion-node-shape.ts';
3
+ export type LengthAssertionNode<Source extends AssertionSource = AssertionSource> = {
4
+ readonly actual: unknown;
5
+ readonly check: 'length';
6
+ readonly expectedLength: number;
7
+ readonly location: ResolvableSourceLocation;
8
+ readonly message: string | null;
9
+ readonly source: Source;
10
+ };
11
+ export type EmptinessAssertionNode<Source extends AssertionSource = AssertionSource> = {
12
+ readonly [Check in 'empty' | 'not-empty']: ActualAssertionNode<Source, Check>;
13
+ }['empty' | 'not-empty'];
14
+ export declare const collectionSummaryByCheck: {
15
+ readonly empty: "Expected collection to be empty.";
16
+ readonly length: "Expected collection length to match.";
17
+ readonly 'not-empty': "Expected collection not to be empty.";
18
+ };
19
+ export declare function evaluateEmpty(assertion: EmptinessAssertionNode): AssertionOutcome;
20
+ export declare function evaluateLength(assertion: LengthAssertionNode): AssertionOutcome;
21
+ export declare function evaluateNotEmpty(assertion: EmptinessAssertionNode): AssertionOutcome;
22
+ //# sourceMappingURL=collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGjH,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IAChF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IACnF,QAAQ,EAAE,KAAK,IAAI,OAAO,GAAG,WAAW,GAAG,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC;CAChF,CAAC,OAAO,GAAG,WAAW,CAAC,CAAC;AAEzB,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC;AAEX,wBAAgB,aAAa,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAQjF;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,mBAAmB,GAAG,gBAAgB,CAS/E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAQpF"}
@@ -0,0 +1,17 @@
1
+ import { type AssertionOutcome } from '../assertion-evaluation.ts';
2
+ import type { AssertionSource, ExpectedAssertionNode } from '../assertion-node-shape.ts';
3
+ export type EqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'equal'>;
4
+ export type NotEqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'not-equal'>;
5
+ export type DeepEqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'deep-equal'>;
6
+ export type NotDeepEqualAssertionNode<Source extends AssertionSource = AssertionSource> = ExpectedAssertionNode<Source, 'not-deep-equal'>;
7
+ export declare const equalitySummaryByCheck: {
8
+ readonly 'deep-equal': "Expected values to be deeply equal.";
9
+ readonly equal: "Expected values to be equal.";
10
+ readonly 'not-deep-equal': "Expected values not to be deeply equal.";
11
+ readonly 'not-equal': "Expected values not to be equal.";
12
+ };
13
+ export declare function evaluateDeepEqual(assertion: DeepEqualAssertionNode): AssertionOutcome;
14
+ export declare function evaluateEqual(assertion: EqualAssertionNode): AssertionOutcome;
15
+ export declare function evaluateNotDeepEqual(assertion: NotDeepEqualAssertionNode): AssertionOutcome;
16
+ export declare function evaluateNotEqual(assertion: NotEqualAssertionNode): AssertionOutcome;
17
+ //# sourceMappingURL=equality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/equality.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuC,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxG,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEzF,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CACpG,MAAM,EACN,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CACvG,MAAM,EACN,WAAW,CACd,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CACxG,MAAM,EACN,YAAY,CACf,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI,qBAAqB,CAC3G,MAAM,EACN,gBAAgB,CACnB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAErF;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAM7E;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,yBAAyB,GAAG,gBAAgB,CAM3F;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,qBAAqB,GAAG,gBAAgB,CAEnF"}
@@ -0,0 +1,13 @@
1
+ import { type AssertionOutcome } from '../assertion-evaluation.ts';
2
+ import type { AssertionSource, ResolvableSourceLocation } from '../assertion-node-shape.ts';
3
+ export type FailAssertionNode<Source extends AssertionSource = AssertionSource> = {
4
+ readonly check: 'fail';
5
+ readonly location: ResolvableSourceLocation;
6
+ readonly message: string | null;
7
+ readonly source: Source;
8
+ };
9
+ export declare const failSummaryByCheck: {
10
+ readonly fail: "Assertion failed.";
11
+ };
12
+ export declare function evaluateFail(assertion: FailAssertionNode): AssertionOutcome;
13
+ //# sourceMappingURL=fail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/fail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE5F,MAAM,MAAM,iBAAiB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE3E"}
@@ -0,0 +1,29 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric.d.ts","sourceRoot":"","sources":["../../../../../source/assertion-protocol/assertions/numeric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB,EAAE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
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,28 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,42 @@
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
@@ -0,0 +1 @@
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,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5F,MAAM,MAAM,iBAAiB,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe,IAAI;IAC9E,QAAQ,EAAE,KAAK,IAAI,kBAAkB,G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E,iBAAiB,GAAG,gBAAgB,CAE7E;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE7E;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAE7E"}
@@ -0,0 +1,32 @@
1
+ import { type AssertionNode, type CompositeAssertionChildNode } from './assertion-node.ts';
2
+ import type { FailedCheck } from './assertion-node-shape.ts';
3
+ type DeepAssertionCheckByName = {
4
+ readonly arrayContainsPartial: 'array-contains-partial';
5
+ readonly deepEqual: 'deep-equal';
6
+ readonly membersPartialDeepEqual: 'members-partial-deep-equal';
7
+ readonly notDeepEqual: 'not-deep-equal';
8
+ readonly partialDeepEqual: 'partial-deep-equal';
9
+ };
10
+ type DeepAssertionCheck = DeepAssertionCheckByName[keyof DeepAssertionCheckByName];
11
+ type DeepAssertionOperandRole = 'actual' | 'expected';
12
+ type PrimitiveValueTypeByName = {
13
+ readonly bigint: 'bigint';
14
+ readonly boolean: 'boolean';
15
+ readonly null: 'null';
16
+ readonly number: 'number';
17
+ readonly string: 'string';
18
+ readonly symbol: 'symbol';
19
+ readonly undefined: 'undefined';
20
+ };
21
+ type PrimitiveValueType = PrimitiveValueTypeByName[keyof PrimitiveValueTypeByName];
22
+ export type InvalidDeepAssertionOperand = {
23
+ readonly check: DeepAssertionCheck;
24
+ readonly index: number | null;
25
+ readonly role: DeepAssertionOperandRole;
26
+ readonly type: PrimitiveValueType;
27
+ };
28
+ export declare function invalidDeepAssertionOperand(assertion: AssertionNode | CompositeAssertionChildNode): InvalidDeepAssertionOperand | null;
29
+ export declare function evaluateAssertion(assertion: AssertionNode | CompositeAssertionChildNode, id: number | string): FailedCheck | null;
30
+ export declare function assertionPasses(assertion: AssertionNode): boolean;
31
+ export {};
32
+ //# sourceMappingURL=evaluation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluation.d.ts","sourceRoot":"","sources":["../../../../source/assertion-protocol/evaluation.ts"],"names":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