mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-25 13:13:04 +00:00
test: tighten channel module loader assertion
This commit is contained in:
@@ -100,10 +100,9 @@ describe("channel plugin module loader helpers", () => {
|
||||
target: fs.realpathSync.native(modulePath),
|
||||
});
|
||||
expect(createJiti).toHaveBeenCalledOnce();
|
||||
expect(createJiti).toHaveBeenCalledWith(
|
||||
expect.stringContaining("module-loader.ts"),
|
||||
expect.objectContaining({ tryNative: false }),
|
||||
);
|
||||
const [loaderFilename, loaderOptions] = createJiti.mock.calls[0] ?? [];
|
||||
expect(loaderFilename).toEqual(expect.stringContaining("module-loader.ts"));
|
||||
expect(loaderOptions?.tryNative).toBe(false);
|
||||
expect(loadWithJiti).toHaveBeenCalledWith(fs.realpathSync.native(modulePath));
|
||||
} finally {
|
||||
for (const [extension, hook] of sourceHooks) {
|
||||
|
||||
Reference in New Issue
Block a user