-
-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Version
System:
OS: Windows 11 10.0.22631
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 9.70 GB / 31.62 GB
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rsbuild/core: 1.1.8 => 1.1.8Details
When executing the defineConfig function in a Jest test, I get the following error:
TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'http://localhost/main.js'
The code under test:
import { defineConfig } from "@rsbuild/core";
export function myDefineConfig() {
return defineConfig({});
}The test:
import { myDefineConfig } from "../src/myDefineConfig.ts";
test("my test", () => {
const config = myDefineConfig();
expect(config).toMatchSnapshot();
});I found this example which inspired most of my reproduction configs. It seems like something changed since this example has been created.
Reproduce link
https://github.com/patricklafrance/rsbuild-jest
Reproduce Steps
pnpm installpnpm test
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working