@creative-introvert/tons-of-tests 2.0.0 → 3.0.0-rc.0
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/README.md +263 -134
- package/dist/cjs/Classify.js +6 -2
- package/dist/cjs/Classify.js.map +1 -1
- package/dist/cjs/RepositoryError.js +24 -33
- package/dist/cjs/RepositoryError.js.map +1 -1
- package/dist/cjs/Show.js +18 -0
- package/dist/cjs/Show.js.map +1 -1
- package/dist/cjs/Test.js +41 -2
- package/dist/cjs/Test.js.map +1 -1
- package/dist/cjs/Test.repository.js +8 -17
- package/dist/cjs/Test.repository.js.map +1 -1
- package/dist/cjs/TestRun.js +20 -0
- package/dist/cjs/TestRun.js.map +1 -0
- package/dist/cjs/TestValueError.js +23 -0
- package/dist/cjs/TestValueError.js.map +1 -0
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/internal/Classify.js +1 -9
- package/dist/cjs/internal/Classify.js.map +1 -1
- package/dist/cjs/internal/Test.js +305 -109
- package/dist/cjs/internal/Test.js.map +1 -1
- package/dist/cjs/internal/Test.repository.sqlite.js +266 -304
- package/dist/cjs/internal/Test.repository.sqlite.js.map +1 -1
- package/dist/cjs/internal/Test.serialization.js +128 -0
- package/dist/cjs/internal/Test.serialization.js.map +1 -0
- package/dist/cjs/internal/common.js.map +1 -1
- package/dist/cjs/internal/stats.js +37 -3
- package/dist/cjs/internal/stats.js.map +1 -1
- package/dist/cjs/internal/summarize.js +155 -36
- package/dist/cjs/internal/summarize.js.map +1 -1
- package/dist/cjs/internal/test-repository-fixtures.js +31 -0
- package/dist/cjs/internal/test-repository-fixtures.js.map +1 -0
- package/dist/cjs/internal/test-repository-migrations.js +68 -0
- package/dist/cjs/internal/test-repository-migrations.js.map +1 -0
- package/dist/cjs/internal/test-result-stats.js +89 -0
- package/dist/cjs/internal/test-result-stats.js.map +1 -0
- package/dist/dts/Classify.d.ts +4 -1
- package/dist/dts/Classify.d.ts.map +1 -1
- package/dist/dts/RepositoryError.d.ts +19 -20
- package/dist/dts/RepositoryError.d.ts.map +1 -1
- package/dist/dts/Show.d.ts +8 -8
- package/dist/dts/Show.d.ts.map +1 -1
- package/dist/dts/Test.d.ts +155 -11
- package/dist/dts/Test.d.ts.map +1 -1
- package/dist/dts/Test.repository.d.ts +94 -8
- package/dist/dts/Test.repository.d.ts.map +1 -1
- package/dist/dts/TestRun.d.ts +18 -0
- package/dist/dts/TestRun.d.ts.map +1 -0
- package/dist/dts/TestValueError.d.ts +17 -0
- package/dist/dts/TestValueError.d.ts.map +1 -0
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/internal/Classify.d.ts +0 -1
- package/dist/dts/internal/Classify.d.ts.map +1 -1
- package/dist/dts/internal/Test.d.ts +58 -31
- package/dist/dts/internal/Test.d.ts.map +1 -1
- package/dist/dts/internal/Test.repository.sqlite.d.ts +66 -11
- package/dist/dts/internal/Test.repository.sqlite.d.ts.map +1 -1
- package/dist/dts/internal/Test.serialization.d.ts +34 -0
- package/dist/dts/internal/Test.serialization.d.ts.map +1 -0
- package/dist/dts/internal/common.d.ts +1 -1
- package/dist/dts/internal/common.d.ts.map +1 -1
- package/dist/dts/internal/stats.d.ts +15 -1
- package/dist/dts/internal/stats.d.ts.map +1 -1
- package/dist/dts/internal/summarize.d.ts +39 -7
- package/dist/dts/internal/summarize.d.ts.map +1 -1
- package/dist/dts/internal/test-repository-fixtures.d.ts +22 -0
- package/dist/dts/internal/test-repository-fixtures.d.ts.map +1 -0
- package/dist/dts/internal/test-repository-migrations.d.ts +11 -0
- package/dist/dts/internal/test-repository-migrations.d.ts.map +1 -0
- package/dist/dts/internal/test-result-stats.d.ts +7 -0
- package/dist/dts/internal/test-result-stats.d.ts.map +1 -0
- package/dist/esm/Classify.js +5 -1
- package/dist/esm/Classify.js.map +1 -1
- package/dist/esm/RepositoryError.js +14 -29
- package/dist/esm/RepositoryError.js.map +1 -1
- package/dist/esm/Show.js +2 -2
- package/dist/esm/Show.js.map +1 -1
- package/dist/esm/Test.js +38 -1
- package/dist/esm/Test.js.map +1 -1
- package/dist/esm/Test.repository.js +7 -16
- package/dist/esm/Test.repository.js.map +1 -1
- package/dist/esm/TestRun.js +13 -0
- package/dist/esm/TestRun.js.map +1 -0
- package/dist/esm/TestValueError.js +16 -0
- package/dist/esm/TestValueError.js.map +1 -0
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal/Classify.js +0 -7
- package/dist/esm/internal/Classify.js.map +1 -1
- package/dist/esm/internal/Test.js +299 -108
- package/dist/esm/internal/Test.js.map +1 -1
- package/dist/esm/internal/Test.repository.sqlite.js +265 -301
- package/dist/esm/internal/Test.repository.sqlite.js.map +1 -1
- package/dist/esm/internal/Test.serialization.js +119 -0
- package/dist/esm/internal/Test.serialization.js.map +1 -0
- package/dist/esm/internal/common.js.map +1 -1
- package/dist/esm/internal/stats.js +35 -2
- package/dist/esm/internal/stats.js.map +1 -1
- package/dist/esm/internal/summarize.js +155 -35
- package/dist/esm/internal/summarize.js.map +1 -1
- package/dist/esm/internal/test-repository-fixtures.js +25 -0
- package/dist/esm/internal/test-repository-fixtures.js.map +1 -0
- package/dist/esm/internal/test-repository-migrations.js +62 -0
- package/dist/esm/internal/test-repository-migrations.js.map +1 -0
- package/dist/esm/internal/test-result-stats.js +83 -0
- package/dist/esm/internal/test-result-stats.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/Test.repository.types.js +0 -14
- package/dist/cjs/Test.repository.types.js.map +0 -1
- package/dist/cjs/internal/lib/Schema.js +0 -14
- package/dist/cjs/internal/lib/Schema.js.map +0 -1
- package/dist/dts/Test.repository.types.d.ts +0 -56
- package/dist/dts/Test.repository.types.d.ts.map +0 -1
- package/dist/dts/internal/lib/Schema.d.ts +0 -4
- package/dist/dts/internal/lib/Schema.d.ts.map +0 -1
- package/dist/esm/Test.repository.types.js +0 -7
- package/dist/esm/Test.repository.types.js.map +0 -1
- package/dist/esm/internal/lib/Schema.js +0 -7
- package/dist/esm/internal/lib/Schema.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepositoryError.js","names":["
|
|
1
|
+
{"version":3,"file":"RepositoryError.js","names":["_effect","require","_TestValueError","TestRunNotCreated","Schema","TaggedError","testSuiteName","String","exports","TestRunIncomplete","testRunId","Int","variant","TestRunNotFound","TestBaselineNotFound"],"sources":["../../src/RepositoryError.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;AACA,IAAAA,OAAA,gBAAAC,OAAA;AAGA,IAAAC,eAAA,gBAAAD,OAAA;AAEM,MAAOE,iBAAkB,sBAAQC,cAAM,CAACC,WAAW,EAGtD,CAAC,mBAAmB,EAAE;EAACC,aAAa,EAAEF,cAAM,CAACG;AAAM,CAAC,CAAC;AAExD;AAAAC,OAAA,CAAAL,iBAAA,GAAAA,iBAAA;AACM,MAAOM,iBAAkB,sBAAQL,cAAM,CAACC,WAAW,EAGtD,CAAC,mBAAmB,EAAE;EACrBC,aAAa,EAAEF,cAAM,CAACG,MAAM;EAC5BG,SAAS,EAAEN,cAAM,CAACO,GAAG;EACrBC,OAAO,EAAER,cAAM,CAACG;CACnB,CAAC;AAAGC,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAEC,MAAOI,eAAgB,sBAAQT,cAAM,CAACC,WAAW,EAGpD,CAAC,iBAAiB,EAAE;EAACK,SAAS,EAAEN,cAAM,CAACO;AAAG,CAAC,CAAC;AAAGH,OAAA,CAAAK,eAAA,GAAAA,eAAA;AAE5C,MAAOC,oBAAqB,sBAAQV,cAAM,CAACC,WAAW,EAGzD,CAAC,sBAAsB,EAAE;EACxBC,aAAa,EAAEF,cAAM,CAACG,MAAM;EAC5BK,OAAO,EAAER,cAAM,CAACG;CACnB,CAAC;AAAGC,OAAA,CAAAM,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/dist/cjs/Show.js
CHANGED
|
@@ -9,6 +9,24 @@ Object.defineProperty(exports, "diff", {
|
|
|
9
9
|
return _diff.showDiff;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "prepareComparison", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _summarize.prepareComparison;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "prepareSummary", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _summarize.prepareSummary;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "runSummaries", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _stats.showRunSummaries;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
12
30
|
Object.defineProperty(exports, "stats", {
|
|
13
31
|
enumerable: true,
|
|
14
32
|
get: function () {
|
package/dist/cjs/Show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.js","names":["_diff","require","_stats","_summarize"],"sources":["../../src/Show.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"Show.js","names":["_diff","require","_stats","_summarize"],"sources":["../../src/Show.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,KAAA,gBAAAC,OAAA;AACA,IAAAC,MAAA,gBAAAD,OAAA;AAIA,IAAAE,UAAA,gBAAAF,OAAA","ignoreList":[]}
|
package/dist/cjs/Test.js
CHANGED
|
@@ -3,12 +3,51 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.runCollectRecord = exports.
|
|
6
|
+
exports.summarizeRun = exports.selectVariant = exports.runCollectRecord = exports.resultKey = exports.filterResults = exports.diff = exports.compareRuns = exports.all = exports.TestVariantRequired = exports.TestVariantNotFound = void 0;
|
|
7
|
+
var _effect = /*#__PURE__*/require("effect");
|
|
7
8
|
var internal = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./internal/Test.js"));
|
|
8
9
|
var cache;
|
|
9
10
|
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
11
|
+
class TestVariantRequired extends /*#__PURE__*/_effect.Schema.TaggedError()('TestVariantRequired', {
|
|
12
|
+
testSuiteName: _effect.Schema.String
|
|
13
|
+
}) {}
|
|
14
|
+
exports.TestVariantRequired = TestVariantRequired;
|
|
15
|
+
class TestVariantNotFound extends /*#__PURE__*/_effect.Schema.TaggedError()('TestVariantNotFound', {
|
|
16
|
+
testSuiteName: _effect.Schema.String,
|
|
17
|
+
variant: _effect.Schema.String
|
|
18
|
+
}) {}
|
|
19
|
+
/** Selects a program without running it or requiring its services. */
|
|
20
|
+
exports.TestVariantNotFound = TestVariantNotFound;
|
|
21
|
+
const selectVariant = exports.selectVariant = internal.selectVariant;
|
|
22
|
+
/**
|
|
23
|
+
* Runs only the selected program. Its error and service types include every
|
|
24
|
+
* configured program and the case stream, even when the variant ID is a literal.
|
|
25
|
+
*/
|
|
10
26
|
const all = exports.all = internal.all;
|
|
27
|
+
/**
|
|
28
|
+
* Compares complete saved runs without evaluating again. The shared codecs must
|
|
29
|
+
* decode both runs and require no Effect services. Callers decide whether comparing
|
|
30
|
+
* different suites or program versions is meaningful.
|
|
31
|
+
*
|
|
32
|
+
* Results match by case hash and evaluation key. A match changes when its label
|
|
33
|
+
* or evaluated values change. Rows follow `to` order, followed by rows found only
|
|
34
|
+
* in `from`, in `from` order. Empty complete runs are valid comparison endpoints.
|
|
35
|
+
* Resolve missing baselines before calling; both endpoints must be saved runs.
|
|
36
|
+
* Incompatible codecs fail with `TestValueError`, which names the saved suite.
|
|
37
|
+
*/
|
|
38
|
+
const compareRuns = exports.compareRuns = internal.compareRuns;
|
|
39
|
+
/**
|
|
40
|
+
* Summarizes all matching results in a complete saved run. Each case contributes
|
|
41
|
+
* its timing once. Empty complete runs have zero counts and no timing values.
|
|
42
|
+
* The shared codecs must still read that run. The caller decides whether the
|
|
43
|
+
* stored values still have the same meaning. Resolve a missing baseline before
|
|
44
|
+
* calling; it differs from an empty run.
|
|
45
|
+
*/
|
|
46
|
+
const summarizeRun = exports.summarizeRun = internal.summarizeRun;
|
|
11
47
|
const diff = exports.diff = internal.diff;
|
|
12
|
-
|
|
48
|
+
/** Builds the lookup key for one evaluation within its original test case. */
|
|
49
|
+
const resultKey = exports.resultKey = internal.resultKey;
|
|
13
50
|
const runCollectRecord = exports.runCollectRecord = internal.runCollectRecord;
|
|
51
|
+
/** Keeps matching results and recalculates counts and case timing statistics. */
|
|
52
|
+
const filterResults = exports.filterResults = internal.filterResults;
|
|
14
53
|
//# sourceMappingURL=Test.js.map
|
package/dist/cjs/Test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Test.js","names":["
|
|
1
|
+
{"version":3,"file":"Test.js","names":["_effect","require","internal","_interopRequireWildcard","cache","e","t","__esModule","r","c","a","Object","defineProperty","n","__proto__","default","WeakMap","has","get","set","hasOwnProperty","call","getOwnPropertyDescriptor","TestVariantRequired","Schema","TaggedError","testSuiteName","String","exports","TestVariantNotFound","variant","selectVariant","all","compareRuns","summarizeRun","diff","resultKey","runCollectRecord","filterResults"],"sources":["../../src/Test.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AASA,IAAAC,QAAA,gBAAAC,uBAAA,cAAAF,OAAA;AAA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AAA;AACO,MAAME,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAG7B,QAAQ,CAAC6B,aAAa;AAEnD;;;;AAIO,MAAMC,GAAG,GAAAJ,OAAA,CAAAI,GAAA,GAAG9B,QAAQ,CAAC8B,GAAG;AAC/B;;;;;;;;;;;AAWO,MAAMC,WAAW,GAAAL,OAAA,CAAAK,WAAA,GAAG/B,QAAQ,CAAC+B,WAAW;AAC/C;;;;;;;AAOO,MAAMC,YAAY,GAAAN,OAAA,CAAAM,YAAA,GAAGhC,QAAQ,CAACgC,YAAY;AAC1C,MAAMC,IAAI,GAAAP,OAAA,CAAAO,IAAA,GAAGjC,QAAQ,CAACiC,IAAI;AACjC;AACO,MAAMC,SAAS,GAAAR,OAAA,CAAAQ,SAAA,GAAGlC,QAAQ,CAACkC,SAAS;AACpC,MAAMC,gBAAgB,GAAAT,OAAA,CAAAS,gBAAA,GAAGnC,QAAQ,CAACmC,gBAAgB;AACzD;AACO,MAAMC,aAAa,GAAAV,OAAA,CAAAU,aAAA,GAAGpC,QAAQ,CAACoC,aAAa","ignoreList":[]}
|
|
@@ -7,34 +7,25 @@ exports.TestRepository = void 0;
|
|
|
7
7
|
Object.defineProperty(exports, "TestRun", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function () {
|
|
10
|
-
return
|
|
10
|
+
return _TestRun.TestRun;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
var Sqlite = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@effect/sql-sqlite-node"));
|
|
14
14
|
var _effect = /*#__PURE__*/require("effect");
|
|
15
15
|
var _TestRepositorySqlite = /*#__PURE__*/require("./internal/Test.repository.sqlite.js");
|
|
16
|
-
var
|
|
16
|
+
var _TestRun = /*#__PURE__*/require("./TestRun.js");
|
|
17
17
|
var cache;
|
|
18
18
|
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}));
|
|
22
|
-
let testLayerCache;
|
|
23
|
-
class TestRepository extends /*#__PURE__*/_effect.Context.Service()('TestRepository') {
|
|
24
|
-
// Lazy getters: makeTestRepository lives in an internal module that has
|
|
25
|
-
// its own import edge back here, so we evaluate these at access time
|
|
26
|
-
// rather than at class definition time to avoid the circular init order.
|
|
27
|
-
static get Live() {
|
|
28
|
-
return _effect.Layer.effect(this, _TestRepositorySqlite.makeTestRepository);
|
|
29
|
-
}
|
|
19
|
+
class TestRepository extends /*#__PURE__*/_effect.Context.Service()('@creative-introvert/tons-of-tests/TestRepository') {
|
|
20
|
+
static layerNoDeps = /*#__PURE__*/_effect.Layer.effect(this, _TestRepositorySqlite.makeTestRepository);
|
|
30
21
|
static layer(dbPath) {
|
|
31
|
-
return _effect.Layer.provide(this.
|
|
22
|
+
return _effect.Layer.provide(this.layerNoDeps, Sqlite.SqliteClient.layer({
|
|
32
23
|
filename: dbPath
|
|
33
24
|
}));
|
|
34
25
|
}
|
|
35
|
-
static
|
|
36
|
-
|
|
37
|
-
}
|
|
26
|
+
static TestLayer = /*#__PURE__*/_effect.Layer.provideMerge(this.layerNoDeps, /*#__PURE__*/Sqlite.SqliteClient.layer({
|
|
27
|
+
filename: ':memory:'
|
|
28
|
+
}));
|
|
38
29
|
}
|
|
39
30
|
exports.TestRepository = TestRepository;
|
|
40
31
|
//# sourceMappingURL=Test.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Test.repository.js","names":["Sqlite","_interopRequireWildcard","require","_effect","_TestRepositorySqlite","
|
|
1
|
+
{"version":3,"file":"Test.repository.js","names":["Sqlite","_interopRequireWildcard","require","_effect","_TestRepositorySqlite","_TestRun","cache","e","t","__esModule","r","c","a","Object","defineProperty","n","__proto__","default","WeakMap","has","get","set","hasOwnProperty","call","getOwnPropertyDescriptor","TestRepository","Context","Service","layerNoDeps","Layer","effect","makeTestRepository","layer","dbPath","provide","SqliteClient","filename","TestLayer","provideMerge","exports"],"sources":["../../src/Test.repository.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,gBAAAC,uBAAA,cAAAC,OAAA;AACA,IAAAC,OAAA,gBAAAD,OAAA;AAUA,IAAAE,qBAAA,gBAAAF,OAAA;AAKA,IAAAG,QAAA,gBAAAH,OAAA;AAAqC,IAAAI,KAAA;AAAA,SAAAL,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAE,UAAA,SAAAF,CAAA,MAAAG,CAAA,EAAAC,CAAA,EAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,QAAAM,MAAA,CAAAN,CAAA,MAAAA,CAAA,SAAAQ,CAAA,MAAAT,KAAA,yBAAAY,OAAA,KAAAZ,KAAA,OAAAY,OAAA,KAAAZ,KAAA,QAAAA,KAAA,CAAAa,GAAA,CAAAZ,CAAA,UAAAD,KAAA,CAAAc,GAAA,CAAAb,CAAA,GAAAD,KAAA,CAAAe,GAAA,CAAAd,CAAA,EAAAQ,CAAA,UAAAJ,CAAA,IAAAJ,CAAA,gBAAAI,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAI,CAAA,OAAAD,CAAA,GAAAE,CAAA,IAAAC,MAAA,CAAAW,wBAAA,CAAAjB,CAAA,EAAAI,CAAA,OAAAD,CAAA,CAAAU,GAAA,IAAAV,CAAA,CAAAW,GAAA,IAAAT,CAAA,CAAAG,CAAA,EAAAJ,CAAA,EAAAD,CAAA,IAAAK,CAAA,CAAAJ,CAAA,IAAAJ,CAAA,CAAAI,CAAA,WAAAI,CAAA;AA0G/B,MAAOU,cAAe,sBAAQC,eAAO,CAACC,OAAO,EAGhD,CAAC,kDAAkD,CAAC;EACnD,OAAgBC,WAAW,gBAAGC,aAAK,CAACC,MAAM,CAAC,IAAI,EAAEC,wCAAkB,CAAC;EAEpE,OAAOC,KAAKA,CAACC,MAAc;IACvB,OAAOJ,aAAK,CAACK,OAAO,CAChB,IAAI,CAACN,WAAW,EAChB5B,MAAM,CAACmC,YAAY,CAACH,KAAK,CAAC;MAACI,QAAQ,EAAEH;IAAM,CAAC,CAAC,CAChD;EACL;EAEA,OAAgBI,SAAS,gBAAGR,aAAK,CAACS,YAAY,CAC1C,IAAI,CAACV,WAAW,eAChB5B,MAAM,CAACmC,YAAY,CAACH,KAAK,CAAC;IAACI,QAAQ,EAAE;EAAU,CAAC,CAAC,CACpD;;AACJG,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TestRun = void 0;
|
|
7
|
+
var _effect = /*#__PURE__*/require("effect");
|
|
8
|
+
/**
|
|
9
|
+
* One saved execution of a suite variant. Results remain available after its
|
|
10
|
+
* program changes or is removed. `Complete` and `Failed` runs cannot be changed.
|
|
11
|
+
* Committing a complete run changes only its variant's baseline pointer.
|
|
12
|
+
*/
|
|
13
|
+
class TestRun extends /*#__PURE__*/_effect.Schema.Class('TestRun')({
|
|
14
|
+
id: _effect.Schema.Int,
|
|
15
|
+
name: _effect.Schema.String,
|
|
16
|
+
variant: _effect.Schema.String,
|
|
17
|
+
state: /*#__PURE__*/_effect.Schema.Literals(['Running', 'Complete', 'Failed'])
|
|
18
|
+
}) {}
|
|
19
|
+
exports.TestRun = TestRun;
|
|
20
|
+
//# sourceMappingURL=TestRun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestRun.js","names":["_effect","require","TestRun","Schema","Class","id","Int","name","String","variant","state","Literals","exports"],"sources":["../../src/TestRun.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAEA;;;;;AAKM,MAAOC,OAAQ,sBAAQC,cAAM,CAACC,KAAK,CAGvC,SAAS,CAAC,CAAC;EACTC,EAAE,EAAEF,cAAM,CAACG,GAAG;EACdC,IAAI,EAAEJ,cAAM,CAACK,MAAM;EACnBC,OAAO,EAAEN,cAAM,CAACK,MAAM;EACtBE,KAAK,eAAEP,cAAM,CAACQ,QAAQ,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC;CAC3D,CAAC;AAAGC,OAAA,CAAAV,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TestValueError = void 0;
|
|
7
|
+
var _effect = /*#__PURE__*/require("effect");
|
|
8
|
+
/** A suite value could not be converted without losing information. */
|
|
9
|
+
class TestValueError extends /*#__PURE__*/_effect.Schema.TaggedError()('TestValueError', {
|
|
10
|
+
suite: _effect.Schema.String,
|
|
11
|
+
caseNumber: _effect.Schema.Int,
|
|
12
|
+
key: /*#__PURE__*/_effect.Schema.optionalKey(_effect.Schema.String),
|
|
13
|
+
field: /*#__PURE__*/_effect.Schema.Literals(['testCase.input', 'testCase.expected', 'evaluation.result', 'evaluation.expected']),
|
|
14
|
+
operation: /*#__PURE__*/_effect.Schema.Literals(['encode', 'decode', 'roundTrip']),
|
|
15
|
+
cause: /*#__PURE__*/_effect.Schema.instanceOf(_effect.Schema.SchemaError)
|
|
16
|
+
}) {
|
|
17
|
+
get message() {
|
|
18
|
+
const key = this.key === undefined ? '' : `, result ${this.key}`;
|
|
19
|
+
return `${this.suite}, case ${this.caseNumber}${key}, ${this.field} (${this.operation}): ${this.cause.message}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.TestValueError = TestValueError;
|
|
23
|
+
//# sourceMappingURL=TestValueError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestValueError.js","names":["_effect","require","TestValueError","Schema","TaggedError","suite","String","caseNumber","Int","key","optionalKey","field","Literals","operation","cause","instanceOf","SchemaError","message","undefined","exports"],"sources":["../../src/TestValueError.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAEA;AACM,MAAOC,cAAe,sBAAQC,cAAM,CAACC,WAAW,EAGnD,CAAC,gBAAgB,EAAE;EAClBC,KAAK,EAAEF,cAAM,CAACG,MAAM;EACpBC,UAAU,EAAEJ,cAAM,CAACK,GAAG;EACtBC,GAAG,eAAEN,cAAM,CAACO,WAAW,CAACP,cAAM,CAACG,MAAM,CAAC;EACtCK,KAAK,eAAER,cAAM,CAACS,QAAQ,CAAC,CACnB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,CACxB,CAAC;EACFC,SAAS,eAAEV,cAAM,CAACS,QAAQ,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;EAC7DE,KAAK,eAAEX,cAAM,CAACY,UAAU,CAACZ,cAAM,CAACa,WAAW;CAC9C,CAAC;EACE,IAAaC,OAAOA,CAAA;IAChB,MAAMR,GAAG,GAAG,IAAI,CAACA,GAAG,KAAKS,SAAS,GAAG,EAAE,GAAG,YAAY,IAAI,CAACT,GAAG,EAAE;IAChE,OAAO,GAAG,IAAI,CAACJ,KAAK,UAAU,IAAI,CAACE,UAAU,GAAGE,GAAG,KAAK,IAAI,CAACE,KAAK,KAAK,IAAI,CAACE,SAAS,MAAM,IAAI,CAACC,KAAK,CAACG,OAAO,EAAE;EACnH;;AACHE,OAAA,CAAAjB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TestRepository = exports.Test = exports.Show = exports.Error = exports.DisplayConfig = exports.Classify = void 0;
|
|
7
|
-
Object.defineProperty(exports, "pack", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _pack.pack;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
7
|
var _Classify = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./Classify.js"));
|
|
14
8
|
exports.Classify = _Classify;
|
|
15
9
|
var _DisplayConfig = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./DisplayConfig.js"));
|
|
16
10
|
exports.DisplayConfig = _DisplayConfig;
|
|
17
11
|
var _Error = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./RepositoryError.js"));
|
|
18
12
|
exports.Error = _Error;
|
|
19
|
-
var _pack = /*#__PURE__*/require("./internal/pack.js");
|
|
20
13
|
var _Show = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./Show.js"));
|
|
21
14
|
exports.Show = _Show;
|
|
22
15
|
var _Test = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("./Test.js"));
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.values = exports.recall = exports.precision = exports.min = exports.median = exports.mean = exports.max = exports.makeClassify = exports.defaultIsNil = exports.
|
|
7
|
-
var _nodeUtil = /*#__PURE__*/require("node:util");
|
|
6
|
+
exports.values = exports.recall = exports.precision = exports.min = exports.median = exports.mean = exports.max = exports.makeClassify = exports.defaultIsNil = exports.LabelSchema = void 0;
|
|
8
7
|
var _effect = /*#__PURE__*/require("effect");
|
|
9
8
|
const values = exports.values = {
|
|
10
9
|
TN: 'TN',
|
|
@@ -13,13 +12,6 @@ const values = exports.values = {
|
|
|
13
12
|
FN: 'FN'
|
|
14
13
|
};
|
|
15
14
|
const LabelSchema = exports.LabelSchema = /*#__PURE__*/_effect.Schema.Literals(['TP', 'TN', 'FP', 'FN']);
|
|
16
|
-
const defaultIsEqual = (a, b) =>
|
|
17
|
-
// FIXME: Expensive, but don't know how else to cheaply remove
|
|
18
|
-
// `undefined`, which is a common source of false results.
|
|
19
|
-
// Parsing the output w/ a schema would be better, or
|
|
20
|
-
// forbidding `undefined`.
|
|
21
|
-
(0, _nodeUtil.isDeepStrictEqual)(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)));
|
|
22
|
-
exports.defaultIsEqual = defaultIsEqual;
|
|
23
15
|
const defaultIsNil = x => x === null || x === undefined;
|
|
24
16
|
exports.defaultIsNil = defaultIsNil;
|
|
25
17
|
const makeClassify = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Classify.js","names":["
|
|
1
|
+
{"version":3,"file":"Classify.js","names":["_effect","require","values","exports","TN","TP","FP","FN","LabelSchema","Schema","Literals","defaultIsNil","x","undefined","makeClassify","isEqual","isOutputNil","isExpectedNil","output","expected","oNil","eNil","precision","m","r","Number","isNaN","recall","min","xs","reduce","POSITIVE_INFINITY","max","NEGATIVE_INFINITY","mean","length","a","b","median","Option","none","sorted","slice","sort","index","Math","floor","fromNullishOr"],"sources":["../../../src/internal/Classify.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAIO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG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