trilean 1.13.9 → 1.13.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evaluator-test-helpers.cjs +14995 -4
- package/dist/evaluator-test-helpers.js +14869 -1
- package/dist-cli/trilean.mjs +1 -1
- package/package.json +3 -2
- package/schemas/trilean.schema.json +1 -1
- package/dist/evaluator-indeterminacy-helpers.cjs +0 -179
- package/dist/evaluator-indeterminacy-helpers.d.cts +0 -55
- package/dist/evaluator-indeterminacy-helpers.d.ts +0 -55
- package/dist/evaluator-indeterminacy-helpers.js +0 -157
- package/dist/index.CZzC1gGg-CQphWYWn.cjs +0 -14998
- package/dist/index.CZzC1gGg-D3-vRdPe.js +0 -14870
package/dist-cli/trilean.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { parseArgs } from "node:util";
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { RegexParseError, compilePattern } from "trilean-regex";
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "1.13.
|
|
7
|
+
var version = "1.13.10";
|
|
8
8
|
// src/computed-value.ts
|
|
9
9
|
/** Dimension symbol -\> exponent, e.g. `{ m: 1, s: -1 }` for metres per second. A bare symbol like `"kg"` is shorthand for `{ kg: 1 }`. */
|
|
10
10
|
const UnitSchema = z.record(z.string(), z.number());
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trilean",
|
|
3
3
|
"description": "Three-valued predicate and expression evaluation trees, stored as JSON and evaluated against injected resolvers, for domain logic — business rules, eligibility checks, formulas, search filters, and more — that needs to be data instead of code.",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.10",
|
|
5
5
|
"bin": {
|
|
6
6
|
"trilean": "./dist-cli/trilean.mjs"
|
|
7
7
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/ExaDev/trilean/issues"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"trilean-regex": "1.0.
|
|
12
|
+
"trilean-regex": "1.0.23",
|
|
13
13
|
"zod": "^4.6.7"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@exadev/eslint-config": "3.0.0",
|
|
19
19
|
"@types/node": "^26.6.5",
|
|
20
20
|
"@vitest/coverage-v8": "^5.0.4",
|
|
21
|
+
"ajv": "8.20.0",
|
|
21
22
|
"canonicalize": "^5.1.0",
|
|
22
23
|
"eslint": "^10.14.0",
|
|
23
24
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$defs":{"ExpressionNode":{"anyOf":[{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"booleanLiteral","type":"string"},"value":{"type":"boolean"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"hitPolicy":{"enum":["first","unique"],"type":"string"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},{"anyOf":[{"additionalProperties":false,"properties":{"im":{"type":"number"},"kind":{"const":"complexLiteral","type":"string"},"re":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","re","im"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"complexLiteral","type":"string"},"magnitude":{"type":"number"},"phase":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","magnitude","phase"],"type":"object"}]}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches","portableMatches","portableNotMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.13.
|
|
1
|
+
{"$defs":{"ExpressionNode":{"anyOf":[{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"booleanLiteral","type":"string"},"value":{"type":"boolean"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"hitPolicy":{"enum":["first","unique"],"type":"string"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},{"anyOf":[{"additionalProperties":false,"properties":{"im":{"type":"number"},"kind":{"const":"complexLiteral","type":"string"},"re":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","re","im"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"complexLiteral","type":"string"},"magnitude":{"type":"number"},"phase":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","magnitude","phase"],"type":"object"}]}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches","portableMatches","portableNotMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.13.10/schemas/trilean.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"$ref":"#/$defs/PredicateNode"},{"$ref":"#/$defs/ExpressionNode"}]}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_index_CZzC1gGg = require("./index.CZzC1gGg-CQphWYWn.cjs");
|
|
3
|
-
const require_evaluator_factory = require("./evaluator-factory.cjs");
|
|
4
|
-
// src/evaluator-indeterminacy-helpers.ts
|
|
5
|
-
/**
|
|
6
|
-
* Shared fixture machinery for the two split indeterminacy test files (evaluator.indeterminacy-table.unit.test.ts, evaluator.indeterminacy-cases.unit.test.ts): systematic, table-driven coverage of README.md's "Indeterminacy reference" section, one fixture per node-kind x reason-code combination that section documents, for every `PredicateNode`/`ExpressionNode` kind implemented. This complements, rather than replaces, the ad hoc behavioural tests already spread across the evaluator.*.test.ts files and truth-tables.unit.test.ts.
|
|
7
|
-
*/
|
|
8
|
-
function isPlainRecord(value) {
|
|
9
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
-
}
|
|
11
|
-
function isUnknownArray(value) {
|
|
12
|
-
return Array.isArray(value);
|
|
13
|
-
}
|
|
14
|
-
/** A single resolver pool shared by every fixture below, covering every named key/table/collection any fixture needs. Fixtures that need genuinely different resolver behaviour (the delegate/call rows) supply their own. */
|
|
15
|
-
const baseResolvers = {
|
|
16
|
-
resolveValue: async (key, context) => {
|
|
17
|
-
if (key === "present") return Promise.resolve({
|
|
18
|
-
found: true,
|
|
19
|
-
value: {
|
|
20
|
-
kind: "number",
|
|
21
|
-
value: 10,
|
|
22
|
-
unit: { m: 1 }
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
if (key === "presentText") return Promise.resolve({
|
|
26
|
-
found: true,
|
|
27
|
-
value: {
|
|
28
|
-
kind: "text",
|
|
29
|
-
value: "hello"
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
if (typeof key === "string" && isPlainRecord(context) && key in context) {
|
|
33
|
-
const value = context[key];
|
|
34
|
-
if (typeof value === "number") return Promise.resolve({
|
|
35
|
-
found: true,
|
|
36
|
-
value: {
|
|
37
|
-
kind: "number",
|
|
38
|
-
value
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
if (typeof value === "string") return Promise.resolve({
|
|
42
|
-
found: true,
|
|
43
|
-
value: {
|
|
44
|
-
kind: "text",
|
|
45
|
-
value
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return Promise.resolve({ found: false });
|
|
50
|
-
},
|
|
51
|
-
resolveLookup: async (table) => {
|
|
52
|
-
if (table === "table1") return Promise.resolve({
|
|
53
|
-
found: true,
|
|
54
|
-
value: {
|
|
55
|
-
kind: "number",
|
|
56
|
-
value: 100
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
return Promise.resolve({ found: false });
|
|
60
|
-
},
|
|
61
|
-
resolveCollection: async (collection, context) => {
|
|
62
|
-
if (collection === "single-notfound") return Promise.resolve([{}]);
|
|
63
|
-
if (collection === "single-wrongtype") return Promise.resolve([{ value: "x" }]);
|
|
64
|
-
if (collection === "single-domainerror") return Promise.resolve([{}]);
|
|
65
|
-
if (collection === "empty") return Promise.resolve([]);
|
|
66
|
-
if (collection === "one-item") return Promise.resolve([{}]);
|
|
67
|
-
if (collection === "nested-outer") return Promise.resolve([{ values: [{ amount: 1 }, { amount: 2 }] }, { values: [{ amount: 10 }] }]);
|
|
68
|
-
if (collection === "values" && isPlainRecord(context)) {
|
|
69
|
-
const values = context.values;
|
|
70
|
-
return Promise.resolve(isUnknownArray(values) ? values : []);
|
|
71
|
-
}
|
|
72
|
-
return Promise.resolve([]);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const numberLiteral = (value) => ({
|
|
76
|
-
kind: "numberLiteral",
|
|
77
|
-
value
|
|
78
|
-
});
|
|
79
|
-
const missingRef = {
|
|
80
|
-
kind: "reference",
|
|
81
|
-
key: "missing"
|
|
82
|
-
};
|
|
83
|
-
const divideByZero = {
|
|
84
|
-
kind: "arithmetic",
|
|
85
|
-
op: "divide",
|
|
86
|
-
left: numberLiteral(1),
|
|
87
|
-
right: numberLiteral(0)
|
|
88
|
-
};
|
|
89
|
-
const wrongTypeArithmetic = {
|
|
90
|
-
kind: "arithmetic",
|
|
91
|
-
op: "add",
|
|
92
|
-
left: {
|
|
93
|
-
kind: "textLiteral",
|
|
94
|
-
value: "x"
|
|
95
|
-
},
|
|
96
|
-
right: numberLiteral(1)
|
|
97
|
-
};
|
|
98
|
-
const trueGuard = {
|
|
99
|
-
kind: "compare",
|
|
100
|
-
op: "eq",
|
|
101
|
-
left: numberLiteral(1),
|
|
102
|
-
right: numberLiteral(1)
|
|
103
|
-
};
|
|
104
|
-
const falseGuard = {
|
|
105
|
-
kind: "compare",
|
|
106
|
-
op: "eq",
|
|
107
|
-
left: numberLiteral(1),
|
|
108
|
-
right: numberLiteral(2)
|
|
109
|
-
};
|
|
110
|
-
const missingGuard = {
|
|
111
|
-
kind: "compare",
|
|
112
|
-
op: "eq",
|
|
113
|
-
left: missingRef,
|
|
114
|
-
right: numberLiteral(1)
|
|
115
|
-
};
|
|
116
|
-
/** Arbitrary non-`{-1,0,1,2}` magnitudes used below, named individually so each numeric literal only appears once (`@typescript-eslint/no-magic-numbers` only exempts -1/0/1/2 and object-literal property values, not values passed as plain call arguments). */
|
|
117
|
-
const memberOfProbeValue = 5;
|
|
118
|
-
const reduceInitialSeed = 5;
|
|
119
|
-
const laterConditionalCaseValue = 3;
|
|
120
|
-
const untouchedReduceInitial = 42;
|
|
121
|
-
const uniqueHitPolicyThirdCaseValue = 3;
|
|
122
|
-
const isDefinite = { status: "definite" };
|
|
123
|
-
const isNotFound = {
|
|
124
|
-
status: "indeterminate",
|
|
125
|
-
code: "not-found"
|
|
126
|
-
};
|
|
127
|
-
const isWrongType = {
|
|
128
|
-
status: "indeterminate",
|
|
129
|
-
code: "wrong-type"
|
|
130
|
-
};
|
|
131
|
-
const isDomainError = {
|
|
132
|
-
status: "indeterminate",
|
|
133
|
-
code: "domain-error"
|
|
134
|
-
};
|
|
135
|
-
function pred(description, node, expected, overrides = {}) {
|
|
136
|
-
const { context, resolvers = baseResolvers, functions } = overrides;
|
|
137
|
-
const { evaluatePredicate: evaluate } = functions ? require_evaluator_factory.createEvaluator({ functions }) : { evaluatePredicate: require_evaluator_factory.evaluatePredicate };
|
|
138
|
-
return {
|
|
139
|
-
description,
|
|
140
|
-
expected,
|
|
141
|
-
run: async () => evaluate(node, context, resolvers)
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function expr(description, node, expected, overrides = {}) {
|
|
145
|
-
const { context, resolvers = baseResolvers, functions } = overrides;
|
|
146
|
-
const { evaluateValue: evaluate } = functions ? require_evaluator_factory.createEvaluator({ functions }) : { evaluateValue: require_evaluator_factory.evaluateValue };
|
|
147
|
-
return {
|
|
148
|
-
description,
|
|
149
|
-
expected,
|
|
150
|
-
run: async () => evaluate(node, context, resolvers)
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
async function runFixture({ run, expected }) {
|
|
154
|
-
const result = await run();
|
|
155
|
-
require_index_CZzC1gGg.globalExpect(result.status).toBe(expected.status);
|
|
156
|
-
if (expected.status === "indeterminate" && result.status === "indeterminate") require_index_CZzC1gGg.globalExpect(result.reason.code).toBe(expected.code);
|
|
157
|
-
}
|
|
158
|
-
exports.baseResolvers = baseResolvers;
|
|
159
|
-
exports.divideByZero = divideByZero;
|
|
160
|
-
exports.expr = expr;
|
|
161
|
-
exports.falseGuard = falseGuard;
|
|
162
|
-
exports.isDefinite = isDefinite;
|
|
163
|
-
exports.isDomainError = isDomainError;
|
|
164
|
-
exports.isNotFound = isNotFound;
|
|
165
|
-
exports.isPlainRecord = isPlainRecord;
|
|
166
|
-
exports.isUnknownArray = isUnknownArray;
|
|
167
|
-
exports.isWrongType = isWrongType;
|
|
168
|
-
exports.laterConditionalCaseValue = laterConditionalCaseValue;
|
|
169
|
-
exports.memberOfProbeValue = memberOfProbeValue;
|
|
170
|
-
exports.missingGuard = missingGuard;
|
|
171
|
-
exports.missingRef = missingRef;
|
|
172
|
-
exports.numberLiteral = numberLiteral;
|
|
173
|
-
exports.pred = pred;
|
|
174
|
-
exports.reduceInitialSeed = reduceInitialSeed;
|
|
175
|
-
exports.runFixture = runFixture;
|
|
176
|
-
exports.trueGuard = trueGuard;
|
|
177
|
-
exports.uniqueHitPolicyThirdCaseValue = uniqueHitPolicyThirdCaseValue;
|
|
178
|
-
exports.untouchedReduceInitial = untouchedReduceInitial;
|
|
179
|
-
exports.wrongTypeArithmetic = wrongTypeArithmetic;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { IndeterminateReason } from "./evaluation.cjs";
|
|
2
|
-
import { FunctionRegistry } from "./functions.cjs";
|
|
3
|
-
import { EvaluationContext, Resolvers } from "./resolvers.cjs";
|
|
4
|
-
import { ExpressionNode, PredicateNode } from "./tree.cjs";
|
|
5
|
-
/**
|
|
6
|
-
* Shared fixture machinery for the two split indeterminacy test files (evaluator.indeterminacy-table.unit.test.ts, evaluator.indeterminacy-cases.unit.test.ts): systematic, table-driven coverage of README.md's "Indeterminacy reference" section, one fixture per node-kind x reason-code combination that section documents, for every `PredicateNode`/`ExpressionNode` kind implemented. This complements, rather than replaces, the ad hoc behavioural tests already spread across the evaluator.*.test.ts files and truth-tables.unit.test.ts.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isPlainRecord(value: unknown): value is Record<string, unknown>;
|
|
9
|
-
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
10
|
-
/** A single resolver pool shared by every fixture below, covering every named key/table/collection any fixture needs. Fixtures that need genuinely different resolver behaviour (the delegate/call rows) supply their own. */
|
|
11
|
-
export declare const baseResolvers: Resolvers;
|
|
12
|
-
export declare const numberLiteral: (value: number) => ExpressionNode;
|
|
13
|
-
export declare const missingRef: ExpressionNode;
|
|
14
|
-
export declare const divideByZero: ExpressionNode;
|
|
15
|
-
export declare const wrongTypeArithmetic: ExpressionNode;
|
|
16
|
-
export declare const trueGuard: PredicateNode;
|
|
17
|
-
export declare const falseGuard: PredicateNode;
|
|
18
|
-
export declare const missingGuard: PredicateNode;
|
|
19
|
-
/** Arbitrary non-`{-1,0,1,2}` magnitudes used below, named individually so each numeric literal only appears once (`@typescript-eslint/no-magic-numbers` only exempts -1/0/1/2 and object-literal property values, not values passed as plain call arguments). */
|
|
20
|
-
export declare const memberOfProbeValue = 5;
|
|
21
|
-
export declare const reduceInitialSeed = 5;
|
|
22
|
-
export declare const laterConditionalCaseValue = 3;
|
|
23
|
-
export declare const untouchedReduceInitial = 42;
|
|
24
|
-
export declare const uniqueHitPolicyThirdCaseValue = 3;
|
|
25
|
-
export type Expected = {
|
|
26
|
-
readonly status: "definite";
|
|
27
|
-
} | {
|
|
28
|
-
readonly status: "indeterminate";
|
|
29
|
-
readonly code: IndeterminateReason["code"];
|
|
30
|
-
};
|
|
31
|
-
export declare const isDefinite: Expected;
|
|
32
|
-
export declare const isNotFound: Expected;
|
|
33
|
-
export declare const isWrongType: Expected;
|
|
34
|
-
export declare const isDomainError: Expected;
|
|
35
|
-
/** The minimal shape `runFixture` needs from either `evaluatePredicate`'s or `evaluateValue`'s result -- both `Evaluation<boolean>` and `Evaluation<ComputedValue>` are structurally assignable here since only the indeterminate branch's `reason` is ever inspected, never the definite branch's `value`. Typing `Fixture.run`'s result as this proper discriminated union, rather than the looser `{ status: string }` it replaces, is what lets `runFixture` below narrow `result.reason` directly instead of needing a type assertion. */
|
|
36
|
-
type FixtureRunResult = {
|
|
37
|
-
readonly status: "definite";
|
|
38
|
-
} | {
|
|
39
|
-
readonly status: "indeterminate";
|
|
40
|
-
readonly reason: IndeterminateReason;
|
|
41
|
-
};
|
|
42
|
-
export interface Fixture {
|
|
43
|
-
readonly description: string;
|
|
44
|
-
readonly expected: Expected;
|
|
45
|
-
readonly run: () => Promise<FixtureRunResult>;
|
|
46
|
-
}
|
|
47
|
-
export interface FixtureOverrides {
|
|
48
|
-
readonly context?: EvaluationContext;
|
|
49
|
-
readonly resolvers?: Resolvers;
|
|
50
|
-
readonly functions?: FunctionRegistry;
|
|
51
|
-
}
|
|
52
|
-
export declare function pred(description: string, node: PredicateNode, expected: Expected, overrides?: FixtureOverrides): Fixture;
|
|
53
|
-
export declare function expr(description: string, node: ExpressionNode, expected: Expected, overrides?: FixtureOverrides): Fixture;
|
|
54
|
-
export declare function runFixture({ run, expected }: Fixture): Promise<void>;
|
|
55
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { IndeterminateReason } from "./evaluation.js";
|
|
2
|
-
import { FunctionRegistry } from "./functions.js";
|
|
3
|
-
import { EvaluationContext, Resolvers } from "./resolvers.js";
|
|
4
|
-
import { ExpressionNode, PredicateNode } from "./tree.js";
|
|
5
|
-
/**
|
|
6
|
-
* Shared fixture machinery for the two split indeterminacy test files (evaluator.indeterminacy-table.unit.test.ts, evaluator.indeterminacy-cases.unit.test.ts): systematic, table-driven coverage of README.md's "Indeterminacy reference" section, one fixture per node-kind x reason-code combination that section documents, for every `PredicateNode`/`ExpressionNode` kind implemented. This complements, rather than replaces, the ad hoc behavioural tests already spread across the evaluator.*.test.ts files and truth-tables.unit.test.ts.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isPlainRecord(value: unknown): value is Record<string, unknown>;
|
|
9
|
-
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
10
|
-
/** A single resolver pool shared by every fixture below, covering every named key/table/collection any fixture needs. Fixtures that need genuinely different resolver behaviour (the delegate/call rows) supply their own. */
|
|
11
|
-
export declare const baseResolvers: Resolvers;
|
|
12
|
-
export declare const numberLiteral: (value: number) => ExpressionNode;
|
|
13
|
-
export declare const missingRef: ExpressionNode;
|
|
14
|
-
export declare const divideByZero: ExpressionNode;
|
|
15
|
-
export declare const wrongTypeArithmetic: ExpressionNode;
|
|
16
|
-
export declare const trueGuard: PredicateNode;
|
|
17
|
-
export declare const falseGuard: PredicateNode;
|
|
18
|
-
export declare const missingGuard: PredicateNode;
|
|
19
|
-
/** Arbitrary non-`{-1,0,1,2}` magnitudes used below, named individually so each numeric literal only appears once (`@typescript-eslint/no-magic-numbers` only exempts -1/0/1/2 and object-literal property values, not values passed as plain call arguments). */
|
|
20
|
-
export declare const memberOfProbeValue = 5;
|
|
21
|
-
export declare const reduceInitialSeed = 5;
|
|
22
|
-
export declare const laterConditionalCaseValue = 3;
|
|
23
|
-
export declare const untouchedReduceInitial = 42;
|
|
24
|
-
export declare const uniqueHitPolicyThirdCaseValue = 3;
|
|
25
|
-
export type Expected = {
|
|
26
|
-
readonly status: "definite";
|
|
27
|
-
} | {
|
|
28
|
-
readonly status: "indeterminate";
|
|
29
|
-
readonly code: IndeterminateReason["code"];
|
|
30
|
-
};
|
|
31
|
-
export declare const isDefinite: Expected;
|
|
32
|
-
export declare const isNotFound: Expected;
|
|
33
|
-
export declare const isWrongType: Expected;
|
|
34
|
-
export declare const isDomainError: Expected;
|
|
35
|
-
/** The minimal shape `runFixture` needs from either `evaluatePredicate`'s or `evaluateValue`'s result -- both `Evaluation<boolean>` and `Evaluation<ComputedValue>` are structurally assignable here since only the indeterminate branch's `reason` is ever inspected, never the definite branch's `value`. Typing `Fixture.run`'s result as this proper discriminated union, rather than the looser `{ status: string }` it replaces, is what lets `runFixture` below narrow `result.reason` directly instead of needing a type assertion. */
|
|
36
|
-
type FixtureRunResult = {
|
|
37
|
-
readonly status: "definite";
|
|
38
|
-
} | {
|
|
39
|
-
readonly status: "indeterminate";
|
|
40
|
-
readonly reason: IndeterminateReason;
|
|
41
|
-
};
|
|
42
|
-
export interface Fixture {
|
|
43
|
-
readonly description: string;
|
|
44
|
-
readonly expected: Expected;
|
|
45
|
-
readonly run: () => Promise<FixtureRunResult>;
|
|
46
|
-
}
|
|
47
|
-
export interface FixtureOverrides {
|
|
48
|
-
readonly context?: EvaluationContext;
|
|
49
|
-
readonly resolvers?: Resolvers;
|
|
50
|
-
readonly functions?: FunctionRegistry;
|
|
51
|
-
}
|
|
52
|
-
export declare function pred(description: string, node: PredicateNode, expected: Expected, overrides?: FixtureOverrides): Fixture;
|
|
53
|
-
export declare function expr(description: string, node: ExpressionNode, expected: Expected, overrides?: FixtureOverrides): Fixture;
|
|
54
|
-
export declare function runFixture({ run, expected }: Fixture): Promise<void>;
|
|
55
|
-
export {};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { t as globalExpect } from "./index.CZzC1gGg-D3-vRdPe.js";
|
|
2
|
-
import { createEvaluator, evaluatePredicate, evaluateValue } from "./evaluator-factory.js";
|
|
3
|
-
// src/evaluator-indeterminacy-helpers.ts
|
|
4
|
-
/**
|
|
5
|
-
* Shared fixture machinery for the two split indeterminacy test files (evaluator.indeterminacy-table.unit.test.ts, evaluator.indeterminacy-cases.unit.test.ts): systematic, table-driven coverage of README.md's "Indeterminacy reference" section, one fixture per node-kind x reason-code combination that section documents, for every `PredicateNode`/`ExpressionNode` kind implemented. This complements, rather than replaces, the ad hoc behavioural tests already spread across the evaluator.*.test.ts files and truth-tables.unit.test.ts.
|
|
6
|
-
*/
|
|
7
|
-
function isPlainRecord(value) {
|
|
8
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9
|
-
}
|
|
10
|
-
function isUnknownArray(value) {
|
|
11
|
-
return Array.isArray(value);
|
|
12
|
-
}
|
|
13
|
-
/** A single resolver pool shared by every fixture below, covering every named key/table/collection any fixture needs. Fixtures that need genuinely different resolver behaviour (the delegate/call rows) supply their own. */
|
|
14
|
-
const baseResolvers = {
|
|
15
|
-
resolveValue: async (key, context) => {
|
|
16
|
-
if (key === "present") return Promise.resolve({
|
|
17
|
-
found: true,
|
|
18
|
-
value: {
|
|
19
|
-
kind: "number",
|
|
20
|
-
value: 10,
|
|
21
|
-
unit: { m: 1 }
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
if (key === "presentText") return Promise.resolve({
|
|
25
|
-
found: true,
|
|
26
|
-
value: {
|
|
27
|
-
kind: "text",
|
|
28
|
-
value: "hello"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
if (typeof key === "string" && isPlainRecord(context) && key in context) {
|
|
32
|
-
const value = context[key];
|
|
33
|
-
if (typeof value === "number") return Promise.resolve({
|
|
34
|
-
found: true,
|
|
35
|
-
value: {
|
|
36
|
-
kind: "number",
|
|
37
|
-
value
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
if (typeof value === "string") return Promise.resolve({
|
|
41
|
-
found: true,
|
|
42
|
-
value: {
|
|
43
|
-
kind: "text",
|
|
44
|
-
value
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return Promise.resolve({ found: false });
|
|
49
|
-
},
|
|
50
|
-
resolveLookup: async (table) => {
|
|
51
|
-
if (table === "table1") return Promise.resolve({
|
|
52
|
-
found: true,
|
|
53
|
-
value: {
|
|
54
|
-
kind: "number",
|
|
55
|
-
value: 100
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
return Promise.resolve({ found: false });
|
|
59
|
-
},
|
|
60
|
-
resolveCollection: async (collection, context) => {
|
|
61
|
-
if (collection === "single-notfound") return Promise.resolve([{}]);
|
|
62
|
-
if (collection === "single-wrongtype") return Promise.resolve([{ value: "x" }]);
|
|
63
|
-
if (collection === "single-domainerror") return Promise.resolve([{}]);
|
|
64
|
-
if (collection === "empty") return Promise.resolve([]);
|
|
65
|
-
if (collection === "one-item") return Promise.resolve([{}]);
|
|
66
|
-
if (collection === "nested-outer") return Promise.resolve([{ values: [{ amount: 1 }, { amount: 2 }] }, { values: [{ amount: 10 }] }]);
|
|
67
|
-
if (collection === "values" && isPlainRecord(context)) {
|
|
68
|
-
const values = context.values;
|
|
69
|
-
return Promise.resolve(isUnknownArray(values) ? values : []);
|
|
70
|
-
}
|
|
71
|
-
return Promise.resolve([]);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const numberLiteral = (value) => ({
|
|
75
|
-
kind: "numberLiteral",
|
|
76
|
-
value
|
|
77
|
-
});
|
|
78
|
-
const missingRef = {
|
|
79
|
-
kind: "reference",
|
|
80
|
-
key: "missing"
|
|
81
|
-
};
|
|
82
|
-
const divideByZero = {
|
|
83
|
-
kind: "arithmetic",
|
|
84
|
-
op: "divide",
|
|
85
|
-
left: numberLiteral(1),
|
|
86
|
-
right: numberLiteral(0)
|
|
87
|
-
};
|
|
88
|
-
const wrongTypeArithmetic = {
|
|
89
|
-
kind: "arithmetic",
|
|
90
|
-
op: "add",
|
|
91
|
-
left: {
|
|
92
|
-
kind: "textLiteral",
|
|
93
|
-
value: "x"
|
|
94
|
-
},
|
|
95
|
-
right: numberLiteral(1)
|
|
96
|
-
};
|
|
97
|
-
const trueGuard = {
|
|
98
|
-
kind: "compare",
|
|
99
|
-
op: "eq",
|
|
100
|
-
left: numberLiteral(1),
|
|
101
|
-
right: numberLiteral(1)
|
|
102
|
-
};
|
|
103
|
-
const falseGuard = {
|
|
104
|
-
kind: "compare",
|
|
105
|
-
op: "eq",
|
|
106
|
-
left: numberLiteral(1),
|
|
107
|
-
right: numberLiteral(2)
|
|
108
|
-
};
|
|
109
|
-
const missingGuard = {
|
|
110
|
-
kind: "compare",
|
|
111
|
-
op: "eq",
|
|
112
|
-
left: missingRef,
|
|
113
|
-
right: numberLiteral(1)
|
|
114
|
-
};
|
|
115
|
-
/** Arbitrary non-`{-1,0,1,2}` magnitudes used below, named individually so each numeric literal only appears once (`@typescript-eslint/no-magic-numbers` only exempts -1/0/1/2 and object-literal property values, not values passed as plain call arguments). */
|
|
116
|
-
const memberOfProbeValue = 5;
|
|
117
|
-
const reduceInitialSeed = 5;
|
|
118
|
-
const laterConditionalCaseValue = 3;
|
|
119
|
-
const untouchedReduceInitial = 42;
|
|
120
|
-
const uniqueHitPolicyThirdCaseValue = 3;
|
|
121
|
-
const isDefinite = { status: "definite" };
|
|
122
|
-
const isNotFound = {
|
|
123
|
-
status: "indeterminate",
|
|
124
|
-
code: "not-found"
|
|
125
|
-
};
|
|
126
|
-
const isWrongType = {
|
|
127
|
-
status: "indeterminate",
|
|
128
|
-
code: "wrong-type"
|
|
129
|
-
};
|
|
130
|
-
const isDomainError = {
|
|
131
|
-
status: "indeterminate",
|
|
132
|
-
code: "domain-error"
|
|
133
|
-
};
|
|
134
|
-
function pred(description, node, expected, overrides = {}) {
|
|
135
|
-
const { context, resolvers = baseResolvers, functions } = overrides;
|
|
136
|
-
const { evaluatePredicate: evaluate } = functions ? createEvaluator({ functions }) : { evaluatePredicate };
|
|
137
|
-
return {
|
|
138
|
-
description,
|
|
139
|
-
expected,
|
|
140
|
-
run: async () => evaluate(node, context, resolvers)
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function expr(description, node, expected, overrides = {}) {
|
|
144
|
-
const { context, resolvers = baseResolvers, functions } = overrides;
|
|
145
|
-
const { evaluateValue: evaluate } = functions ? createEvaluator({ functions }) : { evaluateValue };
|
|
146
|
-
return {
|
|
147
|
-
description,
|
|
148
|
-
expected,
|
|
149
|
-
run: async () => evaluate(node, context, resolvers)
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
async function runFixture({ run, expected }) {
|
|
153
|
-
const result = await run();
|
|
154
|
-
globalExpect(result.status).toBe(expected.status);
|
|
155
|
-
if (expected.status === "indeterminate" && result.status === "indeterminate") globalExpect(result.reason.code).toBe(expected.code);
|
|
156
|
-
}
|
|
157
|
-
export { baseResolvers, divideByZero, expr, falseGuard, isDefinite, isDomainError, isNotFound, isPlainRecord, isUnknownArray, isWrongType, laterConditionalCaseValue, memberOfProbeValue, missingGuard, missingRef, numberLiteral, pred, reduceInitialSeed, runFixture, trueGuard, uniqueHitPolicyThirdCaseValue, untouchedReduceInitial, wrongTypeArithmetic };
|