Files
NapCatQQ/.pnpm-store/v3/files/8a/c6a378d097a8e8b3412d43f6514f3493380db7f9a05e80dabd65319574abb1deacbdb7db6778ea7306671778d6c870ceaa79f509da332dc7c108c60993be5f
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

19 lines
688 B
Plaintext

import { isMainThread, parentPort } from 'node:worker_threads';
import { i as init } from './init.BQhNfT0h.js';
if (isMainThread || !parentPort) throw new Error("Expected worker to be run in node:worker_threads");
function workerInit(options) {
const { runTests } = options;
init({
post: (response) => parentPort.postMessage(response),
on: (callback) => parentPort.on("message", callback),
off: (callback) => parentPort.off("message", callback),
teardown: () => parentPort.removeAllListeners("message"),
runTests: async (state) => runTests("run", state),
collectTests: async (state) => runTests("collect", state),
setup: options.setup
});
}
export { workerInit as w };