From bc14aa7fe324252d93a352890543f27cab16af08 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 06:03:04 +0100 Subject: [PATCH] test: tighten channel module loader assertion --- src/channels/plugins/module-loader.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/channels/plugins/module-loader.test.ts b/src/channels/plugins/module-loader.test.ts index 442eab4cede..8f27a6f8d6c 100644 --- a/src/channels/plugins/module-loader.test.ts +++ b/src/channels/plugins/module-loader.test.ts @@ -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) {