From 98e7e3a5f07b8bc620e26bc1ab6f7a86bccbb7cb Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 8 Feb 2024 13:07:02 +0100 Subject: [PATCH] Move vitest setup file to root (#29097) I'm using this convention in other projects and I think it makes sense for gitea too because the vitest setup file is loaded globally for all tests, not just ones in web_src, so it makes sense to be in the root. --- vitest.config.js | 2 +- web_src/js/{test/setup.js => vitest.setup.js} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename web_src/js/{test/setup.js => vitest.setup.js} (100%) diff --git a/vitest.config.js b/vitest.config.js index 9a6cb4e56..be6c0eadf 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -5,7 +5,7 @@ import {stringPlugin} from 'vite-string-plugin'; export default defineConfig({ test: { include: ['web_src/**/*.test.js'], - setupFiles: ['./web_src/js/test/setup.js'], + setupFiles: ['web_src/js/vitest.setup.js'], environment: 'jsdom', testTimeout: 20000, open: false, diff --git a/web_src/js/test/setup.js b/web_src/js/vitest.setup.js similarity index 100% rename from web_src/js/test/setup.js rename to web_src/js/vitest.setup.js