@dxos/effect 0.8.4-main.fbb7a13 → 0.8.4-main.fcfe5033a5
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/lib/browser/index.mjs +135 -38
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing.mjs +2 -1
- package/dist/lib/browser/testing.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +135 -38
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing.mjs +2 -1
- package/dist/lib/node-esm/testing.mjs.map +3 -3
- package/dist/types/src/Performance.d.ts +25 -0
- package/dist/types/src/Performance.d.ts.map +1 -0
- package/dist/types/src/ast.d.ts.map +1 -1
- package/dist/types/src/async-task-tagging.d.ts +6 -0
- package/dist/types/src/async-task-tagging.d.ts.map +1 -0
- package/dist/types/src/atom-kvs.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +11 -3
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +4 -3
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -12
- package/src/Performance.ts +45 -0
- package/src/ast.test.ts +25 -0
- package/src/ast.ts +24 -12
- package/src/async-task-tagging.ts +47 -0
- package/src/atom-kvs.ts +1 -1
- package/src/errors.ts +59 -13
- package/src/index.ts +2 -0
- package/src/testing.ts +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/effect",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fcfe5033a5",
|
|
4
4
|
"description": "Effect utils.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -38,28 +38,31 @@
|
|
|
38
38
|
"src"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@effect-atom/atom-react": "^0.
|
|
42
|
-
"@effect/opentelemetry": "^0.
|
|
43
|
-
"@effect/platform-browser": "0.73.0",
|
|
41
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
42
|
+
"@effect/opentelemetry": "^0.61.0",
|
|
44
43
|
"@opentelemetry/api": "^1.9.0",
|
|
45
|
-
"jsonpath-plus": "10.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/node-std": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
44
|
+
"jsonpath-plus": "^10.3.0",
|
|
45
|
+
"@dxos/context": "0.8.4-main.fcfe5033a5",
|
|
46
|
+
"@dxos/node-std": "0.8.4-main.fcfe5033a5",
|
|
47
|
+
"@dxos/invariant": "0.8.4-main.fcfe5033a5",
|
|
48
|
+
"@dxos/util": "0.8.4-main.fcfe5033a5"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
51
|
+
"@effect/platform": "0.94.4",
|
|
52
|
+
"@effect/platform-browser": "0.74.0",
|
|
52
53
|
"@opentelemetry/api-logs": "^0.203.0",
|
|
53
54
|
"@opentelemetry/resources": "^2.1.0",
|
|
54
55
|
"@opentelemetry/sdk-logs": "^0.203.0",
|
|
55
56
|
"@opentelemetry/sdk-node": "^0.203.0",
|
|
56
57
|
"@opentelemetry/sdk-trace-node": "^2.1.0",
|
|
57
58
|
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
58
|
-
"effect": "3.
|
|
59
|
-
"@dxos/log": "0.8.4-main.
|
|
59
|
+
"effect": "3.20.0",
|
|
60
|
+
"@dxos/log": "0.8.4-main.fcfe5033a5"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
|
-
"effect": "
|
|
63
|
+
"@effect/platform": "0.94.4",
|
|
64
|
+
"@effect/platform-browser": "0.74.0",
|
|
65
|
+
"effect": "3.20.0"
|
|
63
66
|
},
|
|
64
67
|
"publishConfig": {
|
|
65
68
|
"access": "public"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import type * as Exit from 'effect/Exit';
|
|
7
|
+
|
|
8
|
+
export interface AddTrackEntryOptions {
|
|
9
|
+
name: string;
|
|
10
|
+
devtools?: {
|
|
11
|
+
/**
|
|
12
|
+
* @example 'track-entry'
|
|
13
|
+
*/
|
|
14
|
+
dataType: string;
|
|
15
|
+
track: string;
|
|
16
|
+
trackGroup: string;
|
|
17
|
+
/**
|
|
18
|
+
* @example 'tertiary-dark'
|
|
19
|
+
*/
|
|
20
|
+
color: string;
|
|
21
|
+
properties?: [string, any][];
|
|
22
|
+
tooltipText?: string;
|
|
23
|
+
};
|
|
24
|
+
detail?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Puts the effect span on the performance timeline in DevTools.
|
|
29
|
+
*/
|
|
30
|
+
export const addTrackEntry =
|
|
31
|
+
<A, E>(options: AddTrackEntryOptions | ((exit: Exit.Exit<A, E>) => AddTrackEntryOptions)) =>
|
|
32
|
+
<R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
|
|
33
|
+
Effect.gen(function* () {
|
|
34
|
+
const start = performance.now();
|
|
35
|
+
const exit = yield* Effect.exit(effect);
|
|
36
|
+
const resolvedOptions = typeof options === 'function' ? options(exit) : options;
|
|
37
|
+
performance.measure(resolvedOptions.name, {
|
|
38
|
+
start: start,
|
|
39
|
+
detail: {
|
|
40
|
+
...resolvedOptions.detail,
|
|
41
|
+
devtools: resolvedOptions.devtools,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return yield* exit;
|
|
45
|
+
});
|
package/src/ast.test.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
getAnnotation,
|
|
16
16
|
getDiscriminatedType,
|
|
17
17
|
getDiscriminatingProps,
|
|
18
|
+
getProperties,
|
|
18
19
|
isArrayType,
|
|
19
20
|
isDiscriminatedUnion,
|
|
20
21
|
isOption,
|
|
@@ -90,6 +91,30 @@ describe('AST', () => {
|
|
|
90
91
|
}
|
|
91
92
|
});
|
|
92
93
|
|
|
94
|
+
test('getProperties preserves annotation on property type after refinements', ({ expect }) => {
|
|
95
|
+
// When a property is e.g. Format.Text.pipe(nonEmptyString(), maxLength(), Schema.annotations({ title, description })),
|
|
96
|
+
// the form uses getProperties(schema.ast) and then Format.FormatAnnotation.getFromAst(property.type).
|
|
97
|
+
// Custom title and description from the outer Schema.annotations() must not be lost.
|
|
98
|
+
const WithRefinements = Schema.Struct({
|
|
99
|
+
message: Schema.String.annotations({ title: 'Feedback' }).pipe(
|
|
100
|
+
Schema.minLength(1),
|
|
101
|
+
Schema.maxLength(4096),
|
|
102
|
+
Schema.annotations({
|
|
103
|
+
title: 'Feedback label',
|
|
104
|
+
description: 'Feedback placeholder',
|
|
105
|
+
}),
|
|
106
|
+
),
|
|
107
|
+
});
|
|
108
|
+
const properties = getProperties(WithRefinements.ast);
|
|
109
|
+
const messageProp = properties.find((p) => p.name === 'message');
|
|
110
|
+
invariant(messageProp);
|
|
111
|
+
const title = findAnnotation(messageProp.type, SchemaAST.TitleAnnotationId);
|
|
112
|
+
const description = findAnnotation(messageProp.type, SchemaAST.DescriptionAnnotationId);
|
|
113
|
+
// Outer Schema.annotations() wins so form labels/placeholders are preserved.
|
|
114
|
+
expect(title).to.eq('Feedback label');
|
|
115
|
+
expect(description).to.eq('Feedback placeholder');
|
|
116
|
+
});
|
|
117
|
+
|
|
93
118
|
test('findAnnotation', ({ expect }) => {
|
|
94
119
|
const TestSchema = Schema.NonEmptyString.pipe(Schema.pattern(/^\d{5}$/)).annotations({
|
|
95
120
|
title: 'original title',
|
package/src/ast.ts
CHANGED
|
@@ -27,9 +27,11 @@ const reduceRefinements = (
|
|
|
27
27
|
refinements: SchemaAST.Refinement['filter'][] = [],
|
|
28
28
|
): { type: SchemaAST.AST; refinements: SchemaAST.Refinement['filter'][] } => {
|
|
29
29
|
if (SchemaAST.isRefinement(type)) {
|
|
30
|
-
const annotations = type.annotations;
|
|
31
30
|
const filter = type.filter;
|
|
32
|
-
const nextType = {
|
|
31
|
+
const nextType = {
|
|
32
|
+
...type.from,
|
|
33
|
+
annotations: { ...type.from.annotations, ...type.annotations },
|
|
34
|
+
} as SchemaAST.AST;
|
|
33
35
|
return reduceRefinements(nextType, [...refinements, filter]);
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -60,12 +62,22 @@ export type SchemaProperty = Pick<SchemaAST.PropertySignature, 'name' | 'type' |
|
|
|
60
62
|
*/
|
|
61
63
|
export const getProperties = (ast: SchemaAST.AST): SchemaProperty[] => {
|
|
62
64
|
const properties = SchemaAST.getPropertySignatures(ast);
|
|
63
|
-
return properties.map((prop) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
return properties.map((prop) => {
|
|
66
|
+
const { type, refinements } = getBaseType(prop);
|
|
67
|
+
// Merge PropertySignature-level annotations (e.g., title, description set via .annotations())
|
|
68
|
+
// onto the unwrapped base type so downstream consumers see them.
|
|
69
|
+
const mergedType =
|
|
70
|
+
prop.annotations && Reflect.ownKeys(prop.annotations).length > 0
|
|
71
|
+
? ({ ...type, annotations: { ...type.annotations, ...prop.annotations } } as SchemaAST.AST)
|
|
72
|
+
: type;
|
|
73
|
+
return {
|
|
74
|
+
type: mergedType,
|
|
75
|
+
refinements,
|
|
76
|
+
name: prop.name,
|
|
77
|
+
isOptional: prop.isOptional,
|
|
78
|
+
isReadonly: prop.isReadonly,
|
|
79
|
+
};
|
|
80
|
+
});
|
|
69
81
|
};
|
|
70
82
|
|
|
71
83
|
//
|
|
@@ -252,10 +264,10 @@ export const findProperty = (
|
|
|
252
264
|
//
|
|
253
265
|
|
|
254
266
|
const defaultAnnotations: Record<string, SchemaAST.Annotated> = {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
267
|
+
ObjectKeyword: SchemaAST.objectKeyword,
|
|
268
|
+
StringKeyword: SchemaAST.stringKeyword,
|
|
269
|
+
NumberKeyword: SchemaAST.numberKeyword,
|
|
270
|
+
BooleanKeyword: SchemaAST.booleanKeyword,
|
|
259
271
|
};
|
|
260
272
|
|
|
261
273
|
/**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Context from 'effect/Context';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import { pipe } from 'effect/Function';
|
|
8
|
+
import * as Layer from 'effect/Layer';
|
|
9
|
+
import * as Predicate from 'effect/Predicate';
|
|
10
|
+
import * as Tracer from 'effect/Tracer';
|
|
11
|
+
|
|
12
|
+
const runInTask = Symbol('runInTask');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Traces effect frames using console.createTask so that the proper stack-trace is visible in Chrome Devtools debugger.
|
|
16
|
+
*/
|
|
17
|
+
export const asyncTaskTaggingLayer = () => {
|
|
18
|
+
if (Predicate.hasProperty(console, 'createTask') === false) {
|
|
19
|
+
return Layer.empty;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const makeTracer = Effect.gen(function* () {
|
|
23
|
+
const oldTracer = yield* Effect.tracer;
|
|
24
|
+
return Tracer.make({
|
|
25
|
+
span: (name, ...args) => {
|
|
26
|
+
const span = oldTracer.span(name, ...args);
|
|
27
|
+
const trace = (console as any).createTask(name);
|
|
28
|
+
(span as any)[runInTask] = (f: any) => trace.run(f);
|
|
29
|
+
return span;
|
|
30
|
+
},
|
|
31
|
+
context: (f, fiber) => {
|
|
32
|
+
const maybeParentSpan = Context.getOption(Tracer.ParentSpan)(fiber.currentContext);
|
|
33
|
+
|
|
34
|
+
if (maybeParentSpan._tag === 'None') return oldTracer.context(f, fiber);
|
|
35
|
+
const parentSpan = maybeParentSpan.value;
|
|
36
|
+
if (parentSpan._tag === 'ExternalSpan') return oldTracer.context(f, fiber);
|
|
37
|
+
const span = parentSpan;
|
|
38
|
+
if (runInTask in span && typeof span[runInTask] === 'function') {
|
|
39
|
+
return span[runInTask](() => oldTracer.context(f, fiber));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return oldTracer.context(f, fiber);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return pipe(makeTracer, Effect.map(Layer.setTracer), Layer.unwrapEffect);
|
|
47
|
+
};
|
package/src/atom-kvs.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as BrowserKeyValueStore from '@effect/platform-browser/BrowserKeyValueStore';
|
|
6
5
|
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as BrowserKeyValueStore from '@effect/platform-browser/BrowserKeyValueStore';
|
|
7
7
|
import type * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
9
|
// TODO(wittjosiah): This is currently provided for convenience but maybe should be removed.
|
package/src/errors.ts
CHANGED
|
@@ -12,7 +12,6 @@ import * as Runtime from 'effect/Runtime';
|
|
|
12
12
|
import type * as Tracer from 'effect/Tracer';
|
|
13
13
|
|
|
14
14
|
const spanSymbol = Symbol.for('effect/SpanAnnotation');
|
|
15
|
-
const originalSymbol = Symbol.for('effect/OriginalAnnotation');
|
|
16
15
|
const spanToTrace = GlobalValue.globalValue('effect/Tracer/spanToTrace', () => new WeakMap());
|
|
17
16
|
const locationRegex = /\((.*)\)/g;
|
|
18
17
|
|
|
@@ -31,7 +30,10 @@ const prettyErrorStack = (error: any, appendStacks: string[] = []): any => {
|
|
|
31
30
|
const lines = typeof error.stack === 'string' ? error.stack.split('\n') : [];
|
|
32
31
|
const out = [];
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
// Very hacky way to remove effect runtime internal stack frames.
|
|
34
|
+
let atStack = false,
|
|
35
|
+
inCore = false,
|
|
36
|
+
passedScheduler = false;
|
|
35
37
|
for (let i = 0; i < lines.length; i++) {
|
|
36
38
|
if (!atStack && !lines[i].startsWith(' at ')) {
|
|
37
39
|
out.push(lines[i]);
|
|
@@ -49,6 +51,26 @@ const prettyErrorStack = (error: any, appendStacks: string[] = []): any => {
|
|
|
49
51
|
if (lines[i].includes('effect_internal_function')) {
|
|
50
52
|
break;
|
|
51
53
|
}
|
|
54
|
+
|
|
55
|
+
const filename = lines[i].match(/\/([a-zA-Z0-9_\-.]+):\d+:\d+\)$/)?.[1];
|
|
56
|
+
|
|
57
|
+
if (!inCore && ['core-effect.ts'].includes(filename)) {
|
|
58
|
+
inCore = true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (inCore && !passedScheduler && ['Scheduler.ts'].includes(filename)) {
|
|
62
|
+
passedScheduler = true;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (passedScheduler && !['Scheduler.ts'].includes(filename)) {
|
|
67
|
+
inCore = false;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (inCore) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
|
|
52
74
|
out.push(
|
|
53
75
|
lines[i]
|
|
54
76
|
.replace(/at .*effect_instruction_i.*\((.*)\)/, 'at $1')
|
|
@@ -87,9 +109,7 @@ const prettyErrorStack = (error: any, appendStacks: string[] = []): any => {
|
|
|
87
109
|
|
|
88
110
|
out.push(...appendStacks);
|
|
89
111
|
|
|
90
|
-
|
|
91
|
-
error = error[originalSymbol];
|
|
92
|
-
}
|
|
112
|
+
error = Cause.originalError(error);
|
|
93
113
|
if (error.cause) {
|
|
94
114
|
error.cause = prettyErrorStack(error.cause);
|
|
95
115
|
}
|
|
@@ -125,7 +145,7 @@ export const causeToError = (cause: Cause.Cause<any>): Error => {
|
|
|
125
145
|
const getStackFrames = (): string[] => {
|
|
126
146
|
// Bun requies the target object for `captureStackTrace` to be an Error.
|
|
127
147
|
const o = new Error();
|
|
128
|
-
Error.captureStackTrace(o,
|
|
148
|
+
Error.captureStackTrace(o, causeToError);
|
|
129
149
|
return o.stack!.split('\n').slice(1);
|
|
130
150
|
};
|
|
131
151
|
|
|
@@ -180,13 +200,39 @@ export const runAndForwardErrors = async <A, E>(
|
|
|
180
200
|
return unwrapExit(exit);
|
|
181
201
|
};
|
|
182
202
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Runs the embedded effect asynchronously and throws any failures and defects as errors.
|
|
205
|
+
*/
|
|
206
|
+
export const runInRuntime: {
|
|
207
|
+
<R>(
|
|
208
|
+
runtime: Runtime.Runtime<R>,
|
|
209
|
+
): <A, E>(effect: Effect.Effect<A, E, R>, options?: { signal?: AbortSignal } | undefined) => Promise<A>;
|
|
210
|
+
<R, A, E>(
|
|
211
|
+
runtime: Runtime.Runtime<R>,
|
|
212
|
+
effect: Effect.Effect<A, E, R>,
|
|
213
|
+
options?: { signal?: AbortSignal } | undefined,
|
|
214
|
+
): Promise<A>;
|
|
215
|
+
} = (...args: any[]): any => {
|
|
216
|
+
if (args.length === 1) {
|
|
217
|
+
const [runtime] = args as [Runtime.Runtime<any>];
|
|
218
|
+
return async (
|
|
219
|
+
effect: Effect.Effect<any, any, any>,
|
|
220
|
+
options?: { signal?: AbortSignal } | undefined,
|
|
221
|
+
): Promise<any> => {
|
|
222
|
+
const exit = await Runtime.runPromiseExit(runtime, effect, options);
|
|
223
|
+
return unwrapExit(exit);
|
|
224
|
+
};
|
|
225
|
+
} else {
|
|
226
|
+
const [runtime, effect, options] = args as [
|
|
227
|
+
Runtime.Runtime<any>,
|
|
228
|
+
Effect.Effect<any, any, any>,
|
|
229
|
+
{ signal?: AbortSignal } | undefined,
|
|
230
|
+
];
|
|
231
|
+
return (async () => {
|
|
232
|
+
const exit = await Runtime.runPromiseExit(runtime, effect, options);
|
|
233
|
+
return unwrapExit(exit);
|
|
234
|
+
})();
|
|
235
|
+
}
|
|
190
236
|
};
|
|
191
237
|
|
|
192
238
|
/**
|
package/src/index.ts
CHANGED
package/src/testing.ts
CHANGED
|
@@ -16,7 +16,7 @@ export namespace TestHelpers {
|
|
|
16
16
|
/**
|
|
17
17
|
* Skip the test if the condition is false.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* Example:
|
|
20
20
|
* ```ts
|
|
21
21
|
* it.effect(
|
|
22
22
|
* 'should process an agentic loop using Claude',
|
|
@@ -41,7 +41,7 @@ export namespace TestHelpers {
|
|
|
41
41
|
/**
|
|
42
42
|
* Skip the test if the condition is true.
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* Example:
|
|
45
45
|
* ```ts
|
|
46
46
|
* it.effect(
|
|
47
47
|
* 'should process an agentic loop using Claude',
|
|
@@ -63,6 +63,8 @@ export namespace TestHelpers {
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
export const tagEnabled = (tag: TestTag) => process.env.DX_TEST_TAGS?.includes(tag);
|
|
67
|
+
|
|
66
68
|
/**
|
|
67
69
|
* Skips this test if the tag is not in the list of tags to run.
|
|
68
70
|
* Tags are specified in the `DX_TEST_TAGS` environment variable.
|
|
@@ -74,7 +76,7 @@ export namespace TestHelpers {
|
|
|
74
76
|
(tag: TestTag) =>
|
|
75
77
|
<A, E, R>(effect: Effect.Effect<A, E, R>, ctx: TestContext): Effect.Effect<A, E, R> =>
|
|
76
78
|
Effect.gen(function* () {
|
|
77
|
-
if (!
|
|
79
|
+
if (!tagEnabled(tag)) {
|
|
78
80
|
ctx.skip();
|
|
79
81
|
} else {
|
|
80
82
|
return yield* effect;
|
|
@@ -84,7 +86,7 @@ export namespace TestHelpers {
|
|
|
84
86
|
/**
|
|
85
87
|
* Provide TestContext from test parameters.
|
|
86
88
|
*
|
|
87
|
-
*
|
|
89
|
+
* Example:
|
|
88
90
|
* ```ts
|
|
89
91
|
* it.effect(
|
|
90
92
|
* 'with context',
|