mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-01 09:42:16 +00:00
- Deleted the mock database setup file to streamline the test environment. - Updated the Vitest configuration to remove the reference to the deleted setup file, enhancing clarity in test setup.
35 lines
848 B
TypeScript
35 lines
848 B
TypeScript
import path from "node:path";
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: ["__test__/**/*.test.ts"], // Incluir solo los archivos de test en el directorio __test__
|
|
exclude: ["**/node_modules/**", "**/dist/**", "**/.docker/**"],
|
|
pool: "forks",
|
|
// Se ejecuta antes de todos los tests y aplica mocks globales (db, postgres, etc.)
|
|
},
|
|
define: {
|
|
"process.env": {
|
|
NODE: "test",
|
|
GITHUB_CLIENT_ID: "test",
|
|
GITHUB_CLIENT_SECRET: "test",
|
|
GOOGLE_CLIENT_ID: "test",
|
|
GOOGLE_CLIENT_SECRET: "test",
|
|
},
|
|
},
|
|
plugins: [
|
|
tsconfigPaths({
|
|
projects: [path.resolve(__dirname, "../tsconfig.json")],
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@dokploy/server": path.resolve(
|
|
__dirname,
|
|
"../../../packages/server/src",
|
|
),
|
|
},
|
|
},
|
|
});
|