
























@@ -23,6 +23,14 @@ function makeTempDir(): string {
2323return makeTrackedTempDir("openclaw-doctor-contract-registry", tempDirs);
2424}
252526+function requireFirstCreateJitiCall(): [string, { tryNative?: boolean }] {
27+const call = mocks.createJiti.mock.calls.at(0);
28+if (!call) {
29+throw new Error("expected createJiti call");
30+}
31+return call as [string, { tryNative?: boolean }];
32+}
33+2634afterEach(() => {
2735setPluginDoctorContractRegistryModuleLoaderFactoryForTest?.(undefined);
2836cleanupTrackedTempDirs(tempDirs);
@@ -114,10 +122,9 @@ describe("doctor-contract-registry module loader", () => {
114122}
115123116124expect(mocks.createJiti).toHaveBeenCalledTimes(1);
117-expect(mocks.createJiti.mock.calls[0]?.[0]).toBe(
118-pathToFileURL(contractApiPath, { windows: true }).href,
119-);
120-expect(mocks.createJiti.mock.calls[0]?.[1]?.tryNative).toBe(false);
125+const [jitiPath, jitiOptions] = requireFirstCreateJitiCall();
126+expect(jitiPath).toBe(pathToFileURL(contractApiPath, { windows: true }).href);
127+expect(jitiOptions.tryNative).toBe(false);
121128});
122129123130it("prefers doctor-contract-api over the broader contract-api surface", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。