Files
wehub-resource-sync c48612c494
CI / E2E Tests (push) Has been cancelled
CI / Lint, Typecheck & Unit Tests (push) Has been cancelled
Docs Build / Build docs site (push) Has been cancelled
Publish @openmaic packages / Build, validate & publish (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:23 +08:00

25 lines
1.0 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import { fileURLToPath } from 'node:url';
// Resolve `@openmaic/storage` self-imports and the `@openmaic/dsl` dependency to
// their package sources, so `pnpm test` is standalone on a clean checkout (no
// `dist` build required). Consumers still resolve via each package's `exports`
// map → `dist` as before.
export default defineConfig({
resolve: {
alias: {
'@openmaic/storage': fileURLToPath(new URL('./src/index.ts', import.meta.url)),
'@openmaic/dsl': fileURLToPath(new URL('../dsl/src/index.ts', import.meta.url)),
},
},
test: {
// Node env + explicit shims (test/setup.ts) for the few browser globals the
// backends touch (IndexedDB, URL.createObjectURL, crypto.subtle). The
// backends take their `Storage` / `IDBFactory` by injection, so tests pass
// fresh isolated instances rather than leaning on ambient globals.
environment: 'node',
setupFiles: ['./test/setup.ts'],
include: ['test/**/*.test.ts'],
},
});