@relayfx/test 0.3.6 → 0.4.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/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -72,14 +72,14 @@ __export(exports_wait_test_kit, {
|
|
|
72
72
|
});
|
|
73
73
|
import { Client } from "@relayfx/sdk";
|
|
74
74
|
import { Effect as Effect2, Fiber } from "effect";
|
|
75
|
-
var awaitSuspension = (waitId) => Client.
|
|
75
|
+
var awaitSuspension = (waitId) => Client.waits.list({}).pipe(Effect2.map((waits) => waits.some((wait) => wait.wait_id === waitId && wait.state === "open")), Effect2.tap((suspended) => suspended ? Effect2.void : Effect2.yieldNow), Effect2.repeat({ times: 4999, until: (suspended) => suspended }), Effect2.asVoid);
|
|
76
76
|
var runThroughWait = (options) => Effect2.gen(function* () {
|
|
77
77
|
const fiber = yield* Effect2.forkChild(options.start);
|
|
78
78
|
yield* awaitSuspension(options.waitId);
|
|
79
79
|
if (options.whileSuspended !== undefined) {
|
|
80
80
|
yield* options.whileSuspended;
|
|
81
81
|
}
|
|
82
|
-
yield* Client.wake(options.wake);
|
|
82
|
+
yield* Client.waits.wake(options.wake);
|
|
83
83
|
return yield* Fiber.join(fiber);
|
|
84
84
|
});
|
|
85
85
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@relayfx/test",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Experimental deterministic test kit for Relay applications",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"typecheck": "bun tsc --noEmit"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@batonfx/test": "0.
|
|
40
|
-
"@relayfx/sdk": "0.
|
|
39
|
+
"@batonfx/test": "0.7.0",
|
|
40
|
+
"@relayfx/sdk": "0.4.0",
|
|
41
41
|
"effect": "4.0.0-beta.98"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|