Mercurial > code > home > repos > streamed-graph
diff vite.config.ts @ 150:3ce355e4f388 default tip
bye jest; hi vitest. new working test for styles.ts
author | drewp@bigasterisk.com |
---|---|
date | Mon, 08 May 2023 17:27:44 -0700 |
parents | c26538ee1d1d |
children |
line wrap: on
line diff
--- a/vite.config.ts Mon May 08 14:04:56 2023 -0700 +++ b/vite.config.ts Mon May 08 17:27:44 2023 -0700 @@ -1,3 +1,5 @@ +/// <reference types="vitest" /> + import rollupResolve from "@rollup/plugin-node-resolve"; import terser from "@rollup/plugin-terser"; import { defineConfig, UserConfigExport } from "vite"; @@ -11,6 +13,10 @@ allow: ["src", "node_modules", "."], }, }, + test: { + globals: true, + environment: 'jsdom', + }, build: { lib: { entry: "src/index.ts", @@ -41,7 +47,7 @@ export default defineConfig(({ command, mode }) => { if (command === "serve") { - (config.define as any)["process"] = { env: {} }; + // (config.define as any)["process"] = { env: {} }; return config; } else if (command === "build") { return config;