import { fileURLToPath } from "node:url"; import { defineConfig } from "vitest/config"; /** * `.mts` rather than `.ts`: this package is CommonJS (the Vicinae toolchain * compiles extensions with `module: commonjs`), and Vite warns when an ESM * config is loaded as CJS. The extension lets us write the config as ESM. */ export default defineConfig({ test: { globals: true, include: ["src/__tests__/**/*.test.ts"], }, resolve: { alias: { // Point the API package at the in-memory stub; there is no Vicinae // runtime under test. "@vicinae/api": fileURLToPath(new URL("./src/__mocks__/@vicinae/api.ts", import.meta.url)), }, }, });