mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-23 20:28:47 +00:00
feat(tests): enhance Vitest configuration with additional environment variables and updated setup path
- Updated the setup file path for global mocks in the Vitest configuration to improve clarity. - Added environment variables for GitHub and Google credentials to the test environment, facilitating integration testing.
This commit is contained in:
@@ -7,11 +7,16 @@ export default defineConfig({
|
|||||||
include: ["__test__/**/*.test.ts"], // Incluir solo los archivos de test en el directorio __test__
|
include: ["__test__/**/*.test.ts"], // Incluir solo los archivos de test en el directorio __test__
|
||||||
exclude: ["**/node_modules/**", "**/dist/**", "**/.docker/**"],
|
exclude: ["**/node_modules/**", "**/dist/**", "**/.docker/**"],
|
||||||
pool: "forks",
|
pool: "forks",
|
||||||
setupFiles: ["./__test__/setup/mock-db.ts"],
|
// Se ejecuta antes de todos los tests y aplica mocks globales (db, postgres, etc.)
|
||||||
|
setupFiles: ["./setup/mock-db.ts"],
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
"process.env": {
|
"process.env": {
|
||||||
NODE: "test",
|
NODE: "test",
|
||||||
|
GITHUB_CLIENT_ID: "test",
|
||||||
|
GITHUB_CLIENT_SECRET: "test",
|
||||||
|
GOOGLE_CLIENT_ID: "test",
|
||||||
|
GOOGLE_CLIENT_SECRET: "test",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
Reference in New Issue
Block a user