From a7571976170df83f4371d1592696793b6223e2d0 Mon Sep 17 00:00:00 2001 From: Gengkun Date: Mon, 25 Sep 2023 14:05:33 +0800 Subject: [PATCH] fix: react refresh test windows failed (#4242) --- packages/rspack-plugin-react-refresh/tests/test.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rspack-plugin-react-refresh/tests/test.spec.ts b/packages/rspack-plugin-react-refresh/tests/test.spec.ts index 82816eee958..779e0714291 100644 --- a/packages/rspack-plugin-react-refresh/tests/test.spec.ts +++ b/packages/rspack-plugin-react-refresh/tests/test.spec.ts @@ -94,7 +94,7 @@ describe("react-refresh-rspack-plugin", () => { path.join(__dirname, "fixtures/custom"), { exclude: null, - include: [/node_modules\/foo/] + include: path.join(__dirname, "fixtures/node_modules/foo") }, (_, __, { reactRefresh, fixture, runtime, vendor }) => { expect(vendor).toContain("$RefreshReg$"); @@ -107,7 +107,7 @@ describe("react-refresh-rspack-plugin", () => { compileWithReactRefresh( path.join(__dirname, "fixtures/custom"), { - exclude: /custom\/index.js/ + exclude: path.join(__dirname, "fixtures/custom/index.js") }, (_, __, { reactRefresh, fixture, runtime, vendor }) => { expect(fixture).not.toContain("$RefreshReg$");