@executablemd/testing 0.4.0 → 0.4.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.
- package/esm/src/test-api.js +7 -1
- package/package.json +3 -3
- package/types/src/test-api.d.ts +9 -2
package/esm/src/test-api.js
CHANGED
|
@@ -26,7 +26,13 @@ export const Test = createApi("Test", {
|
|
|
26
26
|
// deno-lint-ignore require-yield
|
|
27
27
|
*boundary(_outcome) { },
|
|
28
28
|
});
|
|
29
|
-
export const
|
|
29
|
+
export const testing = Test.operations.testing;
|
|
30
|
+
export const inTest = Test.operations.inTest;
|
|
31
|
+
export const verbose = Test.operations.verbose;
|
|
32
|
+
export const sessionActive = Test.operations.sessionActive;
|
|
33
|
+
export const record = Test.operations.record;
|
|
34
|
+
export const results = Test.operations.results;
|
|
35
|
+
export const boundary = Test.operations.boundary;
|
|
30
36
|
/** A document execution failed its testing outcome (test failures or zero tests). */
|
|
31
37
|
export class TestFailureError extends Error {
|
|
32
38
|
name = "TestFailureError";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executablemd/testing",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Testing vocabulary for executable.md documents: <Testing>, <Test>, and assertion components.",
|
|
5
5
|
"homepage": "https://executable.md",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@effectionx/context-api": "0.6.0",
|
|
27
27
|
"@effectionx/scope-eval": "0.1.3",
|
|
28
28
|
"@effectionx/timebox": "0.4.3",
|
|
29
|
-
"@executablemd/core": "^0.4.
|
|
30
|
-
"@executablemd/durable-streams": "^0.4.
|
|
29
|
+
"@executablemd/core": "^0.4.2",
|
|
30
|
+
"@executablemd/durable-streams": "^0.4.2",
|
|
31
31
|
"effection": "4.1.0-alpha.7",
|
|
32
32
|
"@std/assert": "npm:@jsr/std__assert@^1.0.17"
|
|
33
33
|
},
|
package/types/src/test-api.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* `<Testing>` boundary and the run-level collector observe each completed
|
|
12
12
|
* test. `boundary` reports each `<Testing>` element's aggregate outcome.
|
|
13
13
|
*/
|
|
14
|
+
import { type Api, type Operations } from "@effectionx/context-api";
|
|
14
15
|
import type { Operation } from "effection";
|
|
15
16
|
/** A completed test, in discovery order. Never holds rendered markdown. */
|
|
16
17
|
export interface TestResult {
|
|
@@ -46,8 +47,14 @@ export interface TestApi {
|
|
|
46
47
|
/** Report a `<Testing>` boundary's aggregate outcome. */
|
|
47
48
|
boundary(outcome: BoundaryOutcome): Operation<void>;
|
|
48
49
|
}
|
|
49
|
-
export declare const Test:
|
|
50
|
-
export declare const testing:
|
|
50
|
+
export declare const Test: Api<TestApi>;
|
|
51
|
+
export declare const testing: Operations<TestApi>["testing"];
|
|
52
|
+
export declare const inTest: Operations<TestApi>["inTest"];
|
|
53
|
+
export declare const verbose: Operations<TestApi>["verbose"];
|
|
54
|
+
export declare const sessionActive: Operations<TestApi>["sessionActive"];
|
|
55
|
+
export declare const record: Operations<TestApi>["record"];
|
|
56
|
+
export declare const results: Operations<TestApi>["results"];
|
|
57
|
+
export declare const boundary: Operations<TestApi>["boundary"];
|
|
51
58
|
/** A document execution failed its testing outcome (test failures or zero tests). */
|
|
52
59
|
export declare class TestFailureError extends Error {
|
|
53
60
|
name: string;
|