Files
radicle-explorer/httpd-client/vite.config.ts
T
Thomas Scholtes 0e359d42d1 Run httpd-client tests in node environment
This prevents polyfills being installed that break node-only
libraries. Also silences warnings when a vite server is not running
while running the tests.
2024-05-27 09:21:08 +02:00

26 lines
602 B
TypeScript

import nodeConfig from "config";
import path from "node:path";
import virtual from "vite-plugin-virtual";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
virtual({
"virtual:config": nodeConfig.util.toObject(),
}),
],
test: {
environment: "node",
include: ["httpd-client/tests/*.test.ts"],
reporters: "verbose",
globalSetup: "./tests/support/globalSetup",
},
resolve: {
alias: {
"@tests": path.resolve("./tests"),
"@app": path.resolve("./src"),
"@httpd-client": path.resolve("./httpd-client"),
},
},
});