@specific.dev/spectest 0.115.0 → 0.115.1

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/daemon.js CHANGED
@@ -5159,6 +5159,7 @@ export function harnessMethods(state) {
5159
5159
  // new method. Check the loaded project, including after warm restore.
5160
5160
  setupInteractive: typeof loaded?.project.interactive?.seed === "function",
5161
5161
  replayEnvironmentMode: true,
5162
+ inFlightTest: state.inFlightTest !== null,
5162
5163
  }),
5163
5164
  // Live bootstrap progress, polled by the control plane during
5164
5165
  // `bootstrap` and streamed into the test-run row. `{}` before the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/spectest",
3
- "version": "0.115.0",
3
+ "version": "0.115.1",
4
4
  "description": "Spectest SDK for defining test environments in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/daemon.ts CHANGED
@@ -6177,6 +6177,7 @@ export function harnessMethods(state: RouteState): MethodTable {
6177
6177
  // new method. Check the loaded project, including after warm restore.
6178
6178
  setupInteractive: typeof loaded?.project.interactive?.seed === "function",
6179
6179
  replayEnvironmentMode: true,
6180
+ inFlightTest: state.inFlightTest !== null,
6180
6181
  }),
6181
6182
 
6182
6183
  // Live bootstrap progress, polled by the control plane during
@@ -0,0 +1,20 @@
1
+ import { expect, test } from "bun:test";
2
+ import { harnessMethods } from "../daemon";
3
+
4
+ test("health reports pending work without acquiring its execution slot", async () => {
5
+ const state = {
6
+ inFlightTest: null as Promise<unknown> | null,
7
+ inFlightBootstrap: null,
8
+ inFlightProjectSetup: null,
9
+ };
10
+ const methods = harnessMethods(state);
11
+ expect((await methods.health({}) as any).inFlightTest).toBe(false);
12
+ let finish!: () => void;
13
+ state.inFlightTest = new Promise<void>((resolve) => { finish = resolve; });
14
+ expect((await methods.health({}) as any).inFlightTest).toBe(true);
15
+ finish();
16
+ await state.inFlightTest;
17
+ // Completion is acknowledged by the execution-slot owner, not just a request timeout.
18
+ state.inFlightTest = null;
19
+ expect((await methods.health({}) as any).inFlightTest).toBe(false);
20
+ });