From 28de0d3ee2af392d220ee49a00b0ef8957065a1c Mon Sep 17 00:00:00 2001 From: Steven Reina Date: Wed, 9 Aug 2023 23:32:08 +0200 Subject: [PATCH] Fixed vitest templates 'registerNodeLoader' on true wouldn't let the tests run successfully, not in this version, nor in newer. It also is necessary to have it explicitly on false, or else, the tests wouldn't work either. Besides it doesn't log any warning on dependency duplicity, like it does in other cases, so I also removed the comment that said that. --- js-vitest/vite.config.js | 3 +-- ts-vitest/vite.config.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/js-vitest/vite.config.js b/js-vitest/vite.config.js index 034b1ba..e0bbc45 100644 --- a/js-vitest/vite.config.js +++ b/js-vitest/vite.config.js @@ -10,8 +10,7 @@ export default defineConfig({ web: [/\.jsx?$/], }, setupFiles: ['node_modules/@testing-library/jest-dom/extend-expect.js'], - // otherwise, solid would be loaded twice: - deps: { registerNodeLoader: true }, + deps: { registerNodeLoader: false }, // if you have few tests, try commenting one // or both out to improve performance: // threads: false, diff --git a/ts-vitest/vite.config.ts b/ts-vitest/vite.config.ts index 6d141d7..b4ca423 100644 --- a/ts-vitest/vite.config.ts +++ b/ts-vitest/vite.config.ts @@ -22,8 +22,7 @@ export default defineConfig({ globals: true, transformMode: { web: [/\.[jt]sx?$/] }, setupFiles: ['node_modules/@testing-library/jest-dom/extend-expect.js'], - // otherwise, solid would be loaded twice: - deps: { registerNodeLoader: true }, + deps: { registerNodeLoader: false }, // if you have few tests, try commenting one // or both out to improve performance: threads: false,