MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / setupGlobal

Function setupGlobal

packages/message/server.test.ts:14–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const nextTick = () => Promise.resolve().then(() => {});
13
14const setupGlobal = () => {
15 const testFlag = `${uuidv4()}::server.test`;
16
17 // 创建 scripting 和 inject / content 之间的消息通道
18 inboundMessage = new CustomEventMessage(testFlag, true); // scripting 端
19 outboundMessage = new CustomEventMessage(testFlag, false); // inject / content 端
20
21 // 服务端使用 scripting 消息
22 server = new Server("api", inboundMessage);
23
24 // 客户端使用 inject / content 消息
25 client = outboundMessage;
26};
27
28beforeEach(() => {
29 setupGlobal();

Callers 1

server.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected