GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(server): time out the unsaved-note card on a test clock · pingdotgg/t3code@9c73dbd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/mcp
    • OrchestratorMcpService.activity.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/mcp/OrchestratorMcpService.activity.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/mcp/OrchestratorMcpService.activity.test.ts
+13-7Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ import {
1414
} from "@t3tools/contracts";
1515
import * as DateTime from "effect/DateTime";
1616
import * as Effect from "effect/Effect";
17+
import * as Fiber from "effect/Fiber";
1718
import * as Layer from "effect/Layer";
1819
import * as Metric from "effect/Metric";
20+
import * as TestClock from "effect/testing/TestClock";
1921
import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
2022
import { expect, it } from "vite-plus/test";
2123

@@ -820,13 +822,17 @@ it("requestSecret returns the unsaved note for a declined, cancelled or timed-ou
820822
);
821823
return Effect.gen(function* () {
822824
const service = yield* OrchestratorMcpService.OrchestratorMcpService;
823-
return yield* service.requestSecret(makeScope(), {
824-
label: "Staging password",
825-
reason: "Signs in the QA account.",
826-
delivery: "file",
827-
timeoutMs: 1_000,
828-
});
829-
}).pipe(Effect.provide(layer));
825+
const request = yield* service
826+
.requestSecret(makeScope(), {
827+
label: "Staging password",
828+
reason: "Signs in the QA account.",
829+
delivery: "file",
830+
timeoutMs: 1_000,
831+
})
832+
.pipe(Effect.forkChild({ startImmediately: true }));
833+
yield* TestClock.adjust("2 seconds");
834+
return yield* Fiber.join(request);
835+
}).pipe(Effect.provide(Layer.merge(layer, TestClock.layer())));
830836
}).pipe(Effect.runPromise);
831837

832838
expect(results).toEqual([

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.