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) {