@fncts/test 0.0.17 → 0.0.18
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/control/Annotations/definition.d.ts +1 -1
- package/control/Assertion/definition.d.ts +1 -1
- package/control/AssertionIO/definition.d.ts +2 -2
- package/control/DefaultTestReporter/render.d.ts +1 -1
- package/control/FreeBooleanAlgebraIO/definition.d.ts +1 -1
- package/control/Spec/definition.d.ts +2 -2
- package/control/Test.d.ts +1 -1
- package/control/TestAnnotationRenderer/definition.d.ts +1 -1
- package/control/TestAspect/api.d.ts +2 -2
- package/control/TestAspect/definition.d.ts +1 -1
- package/control/TestClock/definition.d.ts +1 -1
- package/control/TestEnvironment.d.ts +1 -1
- package/control/TestRenderer/definition.d.ts +1 -1
- package/data/AssertionData.d.ts +1 -1
- package/data/AssertionResult.d.ts +1 -1
- package/data/AssertionValue/definition.d.ts +1 -1
- package/data/ExecutedSpec/definition.d.ts +1 -1
- package/data/ExecutionResult.d.ts +2 -2
- package/data/FailureDetails.d.ts +1 -1
- package/data/FreeBooleanAlgebra/definition.d.ts +1 -1
- package/data/LogLine/Style.d.ts +1 -1
- package/data/Render/definition.d.ts +1 -1
- package/data/RenderParam/definition.d.ts +1 -1
- package/data/TestAnnotation/definition.d.ts +1 -1
- package/data/TestFailure.d.ts +1 -1
- package/data/TestSuccess.d.ts +1 -1
- package/package.json +4 -4
- package/util/math.d.ts +1 -1
@@ -3,7 +3,7 @@ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
|
3
3
|
import { Fiber } from "@fncts/io/Fiber/definition";
|
4
4
|
import type { TestAnnotation } from "../../data/TestAnnotation.js";
|
5
5
|
import type { TestAnnotationMap } from "../../data/TestAnnotationMap.js";
|
6
|
-
export
|
6
|
+
export type Annotated<A> = readonly [A, TestAnnotationMap];
|
7
7
|
/**
|
8
8
|
* @tsplus type fncts.test.Annotations
|
9
9
|
* @tsplus companion fncts.test.AnnotationsOps
|
@@ -6,7 +6,7 @@ import { AssertionIO } from "../AssertionIO.js";
|
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.test.FreeBooleanAlgebra
|
8
8
|
*/
|
9
|
-
export
|
9
|
+
export type AssertResult<A> = FreeBooleanAlgebra<AssertionValue<A>>;
|
10
10
|
/**
|
11
11
|
* @tsplus type fncts.test.Assertion
|
12
12
|
* @tsplus companion fncts.test.AssertionOps
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { AssertionValue } from "../../data/AssertionValue.js";
|
2
2
|
import type { Render } from "../../data/Render.js";
|
3
3
|
import type { FreeBooleanAlgebraIO } from "../FreeBooleanAlgebraIO.js";
|
4
|
-
export
|
4
|
+
export type AssertResultIO<A> = FreeBooleanAlgebraIO<never, never, AssertionValue<A>>;
|
5
5
|
export declare const AssertionIOTypeId: unique symbol;
|
6
|
-
export
|
6
|
+
export type AssertionIOTypeId = typeof AssertionIOTypeId;
|
7
7
|
/**
|
8
8
|
* @tsplus type fncts.test.AssertionIO
|
9
9
|
* @tsplus companion fncts.test.AssertionIOOps
|
@@ -8,7 +8,7 @@ import type { ExecutionResult } from "../../data/ExecutionResult.js";
|
|
8
8
|
import type { TestAnnotationRenderer } from "../TestAnnotationRenderer.js";
|
9
9
|
import type { TestRenderer } from "../TestRenderer/definition.js";
|
10
10
|
import { TestLogger } from "../TestLogger.js";
|
11
|
-
export
|
11
|
+
export type TestReporter<E> = (duration: number, spec: ExecutedSpec<E>) => URIO<TestLogger, void>;
|
12
12
|
/**
|
13
13
|
* @tsplus static fncts.test.DefaultTestReporter report
|
14
14
|
* @tsplus location "@fncts/test/control/DefaultTestReporter/render"
|
@@ -3,7 +3,7 @@ import type { FreeBooleanAlgebra } from "../../data/FreeBooleanAlgebra.js";
|
|
3
3
|
/**
|
4
4
|
* @tsplus type fncts.test.FreeBooleanAlgebraIO
|
5
5
|
*/
|
6
|
-
export
|
6
|
+
export type FreeBooleanAlgebraIO<R, E, A> = IO<R, E, FreeBooleanAlgebra<A>>;
|
7
7
|
/**
|
8
8
|
* @tsplus type fncts.test.FreeBooleanAlgebraIOOps
|
9
9
|
*/
|
@@ -26,7 +26,7 @@ export declare const Spec: SpecOps;
|
|
26
26
|
/**
|
27
27
|
* @tsplus type fncts.test.PSpec
|
28
28
|
*/
|
29
|
-
export
|
29
|
+
export type Spec<R, E> = PSpec<R, TestFailure<E>, TestSuccess>;
|
30
30
|
export declare const enum SpecCaseTag {
|
31
31
|
Exec = "Exec",
|
32
32
|
Labeled = "Labeled",
|
@@ -83,7 +83,7 @@ export declare class TestCase<R, E, T> {
|
|
83
83
|
/**
|
84
84
|
* @tsplus type fncts.test.SpecCase
|
85
85
|
*/
|
86
|
-
export
|
86
|
+
export type SpecCase<R, E, T, A> = ExecCase<A> | LabeledCase<A> | ScopedCase<R, E, A> | MultipleCase<A> | TestCase<R, E, T>;
|
87
87
|
/**
|
88
88
|
* @tsplus fluent fncts.test.SpecCase isMultiple
|
89
89
|
* @tsplus location "@fncts/test/control/Spec/definition"
|
package/control/Test.d.ts
CHANGED
@@ -6,7 +6,7 @@ import { TestSuccess } from "../data/TestSuccess.js";
|
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.control.IO
|
8
8
|
*/
|
9
|
-
export
|
9
|
+
export type Test<R, E> = IO<R, TestFailure<E>, TestSuccess>;
|
10
10
|
/**
|
11
11
|
* @tsplus type fncts.test.TestOps
|
12
12
|
*/
|
@@ -22,7 +22,7 @@ export declare class CompositeRenderer {
|
|
22
22
|
/**
|
23
23
|
* @tsplus type fncts.test.TestAnnotationRenderer
|
24
24
|
*/
|
25
|
-
export
|
25
|
+
export type TestAnnotationRenderer = LeafRenderer | CompositeRenderer;
|
26
26
|
/**
|
27
27
|
* @tsplus type fncts.test.TestAnnotationRendererOps
|
28
28
|
*/
|
@@ -8,8 +8,8 @@ import type { TestSuccess } from "@fncts/test/data/TestSuccess";
|
|
8
8
|
import { Annotations } from "@fncts/test/control/Annotations";
|
9
9
|
import { Live } from "@fncts/test/control/Live";
|
10
10
|
import { TestFailure } from "@fncts/test/data/TestFailure";
|
11
|
-
export
|
12
|
-
export
|
11
|
+
export type TestAspectAtLeastR<R> = TestAspect<R, never>;
|
12
|
+
export type TestAspectPoly = TestAspect<unknown, never>;
|
13
13
|
export declare const id: TestAspectPoly;
|
14
14
|
export declare const ignore: TestAspectAtLeastR<Annotations>;
|
15
15
|
export declare function perTest<R, E>(f: <R1, E1>(test: IO<R1, TestFailure<E1>, TestSuccess>) => IO<R | R1, TestFailure<E | E1>, TestSuccess>): TestAspect<R, E>;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { Spec } from "@fncts/test/control/Spec";
|
2
|
-
export
|
2
|
+
export type TestAspect<R, E> = <R1, E1>(spec: Spec<R1, E1>) => Spec<R | R1, E | E1>;
|
@@ -34,7 +34,7 @@ interface Pending {
|
|
34
34
|
interface Done {
|
35
35
|
readonly _tag: "Done";
|
36
36
|
}
|
37
|
-
|
37
|
+
type WarningData = Start | Pending | Done;
|
38
38
|
export declare const Start: WarningData;
|
39
39
|
export declare const Pending: (fiber: Fiber<never, void>) => WarningData;
|
40
40
|
export declare const Done: WarningData;
|
@@ -10,6 +10,6 @@ import { TestClock } from "@fncts/test/control/TestClock";
|
|
10
10
|
import { TestConsole } from "@fncts/test/control/TestConsole";
|
11
11
|
import { TestRandom } from "@fncts/test/control/TestRandom";
|
12
12
|
import { TestConfig } from "@fncts/test/data/TestConfig";
|
13
|
-
export
|
13
|
+
export type TestEnvironment = Annotations | Live | Sized | TestClock | TestConfig | TestRandom | Clock | Random | Console | TestConsole;
|
14
14
|
export declare const LiveTestEnvironment: Layer<IOEnv, never, TestEnvironment>;
|
15
15
|
export declare const TestEnvironment: import("@fncts/io/Layer").Layer<never, never, TestEnvironment>;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { Vector } from "@fncts/base/collection/immutable/Vector";
|
2
2
|
import type { ExecutionResult } from "../../data/ExecutionResult.js";
|
3
3
|
import type { TestAnnotationRenderer } from "../TestAnnotationRenderer.js";
|
4
|
-
export
|
4
|
+
export type TestRenderer = (results: Vector<ExecutionResult>, testAnnotationRenderer: TestAnnotationRenderer) => Vector<string>;
|
package/data/AssertionData.d.ts
CHANGED
@@ -2,7 +2,7 @@ import type { Assertion } from "../control/Assertion/definition.js";
|
|
2
2
|
import { AssertionValue } from "./AssertionValue.js";
|
3
3
|
import { FreeBooleanAlgebra } from "./FreeBooleanAlgebra.js";
|
4
4
|
export declare const AssertionDataTypeId: unique symbol;
|
5
|
-
export
|
5
|
+
export type AssertionDataTypeId = typeof AssertionDataTypeId;
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.test.data.AssertionData
|
8
8
|
*/
|
@@ -9,7 +9,7 @@ export declare class FailureDetailsResult {
|
|
9
9
|
/**
|
10
10
|
* @tsplus type fncts.test.data.AssertionResult
|
11
11
|
*/
|
12
|
-
export
|
12
|
+
export type AssertionResult = FailureDetailsResult;
|
13
13
|
/**
|
14
14
|
* @tsplus type fncts.test.data.AssertionResultOps
|
15
15
|
*/
|
@@ -3,7 +3,7 @@ import { Maybe, Nothing } from "@fncts/base/data/Maybe/definition";
|
|
3
3
|
import type { AssertionIO } from "../../control/AssertionIO/definition.js";
|
4
4
|
import type { FreeBooleanAlgebra } from "../FreeBooleanAlgebra.js";
|
5
5
|
export declare const AssertionValueTypeId: unique symbol;
|
6
|
-
export
|
6
|
+
export type AssertionValueTypeId = typeof AssertionValueTypeId;
|
7
7
|
/**
|
8
8
|
* @tsplus type fncts.test.data.AssertionValue
|
9
9
|
* @tsplus companion fncts.test.data.AssertionValueOps
|
@@ -36,4 +36,4 @@ export declare class MultipleCase<A> {
|
|
36
36
|
/**
|
37
37
|
* @tsplus type fncts.test.data.ExecutedSpecCase
|
38
38
|
*/
|
39
|
-
export
|
39
|
+
export type SpecCase<E, A> = TestCase<E> | LabeledCase<A> | MultipleCase<A>;
|
@@ -13,7 +13,7 @@ export interface Ignored {
|
|
13
13
|
readonly _tag: "Ignored";
|
14
14
|
}
|
15
15
|
export declare const Ignored: Ignored;
|
16
|
-
export
|
16
|
+
export type Status = Failed | Passed | Ignored;
|
17
17
|
interface Test {
|
18
18
|
readonly _tag: "Test";
|
19
19
|
}
|
@@ -26,7 +26,7 @@ export interface Other {
|
|
26
26
|
readonly _tag: "Other";
|
27
27
|
}
|
28
28
|
export declare const Other: ResultType;
|
29
|
-
export
|
29
|
+
export type ResultType = Test | Suite | Other;
|
30
30
|
/**
|
31
31
|
* @tsplus type fncts.test.ExecutionResult
|
32
32
|
*/
|
package/data/FailureDetails.d.ts
CHANGED
@@ -7,7 +7,7 @@ import type { GenFailureDetails } from "./GenFailureDetails.js";
|
|
7
7
|
/**
|
8
8
|
* @tsplus type fncts.test.FreeBooleanAlgebra
|
9
9
|
*/
|
10
|
-
export
|
10
|
+
export type TestResult = FreeBooleanAlgebra<FailureDetailsResult>;
|
11
11
|
export declare class FailureDetails {
|
12
12
|
readonly assertion: Cons<AssertionValue<any>>;
|
13
13
|
readonly gen: Maybe<GenFailureDetails<any>>;
|
@@ -29,7 +29,7 @@ export declare class Not<A> {
|
|
29
29
|
/**
|
30
30
|
* @tsplus type fncts.test.FreeBooleanAlgebra
|
31
31
|
*/
|
32
|
-
export
|
32
|
+
export type FreeBooleanAlgebra<A> = Value<A> | And<A> | Or<A> | Not<A>;
|
33
33
|
/**
|
34
34
|
* @tsplus type fncts.test.FreeBooleanAlgebraOps
|
35
35
|
*/
|
package/data/LogLine/Style.d.ts
CHANGED
@@ -98,7 +98,7 @@ export declare function Ansi(fr: Fragment, ansiColor: string): Style;
|
|
98
98
|
/**
|
99
99
|
* @tsplus type fncts.test.data.StyleOps
|
100
100
|
*/
|
101
|
-
export
|
101
|
+
export type Style = Primary | Default | Warning | Error | Info | Detail | Dimmed | Bold | Underlined | Ansi;
|
102
102
|
/**
|
103
103
|
* @tsplus type fncts.test.data.StyleOps
|
104
104
|
*/
|
@@ -22,7 +22,7 @@ export declare class RenderInfix {
|
|
22
22
|
/**
|
23
23
|
* @tsplus type fncts.test.data.Render
|
24
24
|
*/
|
25
|
-
export
|
25
|
+
export type Render = RenderFunction | RenderInfix;
|
26
26
|
/**
|
27
27
|
* @tsplus type fncts.test.data.RenderOps
|
28
28
|
*/
|
@@ -16,7 +16,7 @@ export declare class RenderValue<A> {
|
|
16
16
|
/**
|
17
17
|
* @tsplus type fncts.test.data.RenderParam
|
18
18
|
*/
|
19
|
-
export
|
19
|
+
export type RenderParam<A = any> = RenderAssertionIO<A> | RenderValue<A>;
|
20
20
|
/**
|
21
21
|
* @tsplus type fncts.test.data.RenderParamOps
|
22
22
|
*/
|
@@ -2,7 +2,7 @@ import { Hashable } from "@fncts/base/typeclass/Hashable";
|
|
2
2
|
import { Equatable } from "@fncts/base/typeclass/Equatable";
|
3
3
|
import { Tag } from "@fncts/base/data/Tag/definition";
|
4
4
|
export declare const TestAnnotationTypeId: unique symbol;
|
5
|
-
export
|
5
|
+
export type TestAnnotationTypeId = typeof TestAnnotationTypeId;
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.test.TestAnnotation
|
8
8
|
* @tsplus companion fncts.test.TestAnnotationOps
|
package/data/TestFailure.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare class RuntimeFailure<E> {
|
|
17
17
|
/**
|
18
18
|
* @tsplus type fncts.test.data.TestFailure
|
19
19
|
*/
|
20
|
-
export
|
20
|
+
export type TestFailure<E> = AssertionFailure | RuntimeFailure<E>;
|
21
21
|
/**
|
22
22
|
* @tsplus type fncts.test.data.TestFailureOps
|
23
23
|
*/
|
package/data/TestSuccess.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fncts/test",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.18",
|
4
4
|
"dependencies": {
|
5
|
-
"@fncts/base": "0.0.
|
6
|
-
"@fncts/io": "0.0.
|
7
|
-
"@fncts/typelevel": "0.0.
|
5
|
+
"@fncts/base": "0.0.18",
|
6
|
+
"@fncts/io": "0.0.18",
|
7
|
+
"@fncts/typelevel": "0.0.14"
|
8
8
|
},
|
9
9
|
"exports": {
|
10
10
|
"./*": {
|
package/util/math.d.ts
CHANGED
@@ -22,7 +22,7 @@ export declare function indexInFloatFromDecomp(exponent: number, significand: nu
|
|
22
22
|
*/
|
23
23
|
export declare function indexToFloat(index: number): number;
|
24
24
|
/** @internal */
|
25
|
-
export
|
25
|
+
export type ArrayInt64 = {
|
26
26
|
sign: 1 | -1;
|
27
27
|
data: [number, number];
|
28
28
|
};
|