mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 21:57:06 +00:00
@hanzo/cards resolves to its built dist/, which a fresh install does not have, so five suites in the two packages failed to import it and `pnpm -r test` from a clean clone was red. Their vitest configs alias @hanzo/cards to packages/cards/src/index.ts. The tests now run without a prior build, in any order, against the same code the build would bundle. Co-authored-by: Hanzo Dev <[email protected]>
15 lines
471 B
TypeScript
15 lines
471 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
// @hanzo/cards resolves to its built dist/, which a fresh install does not
|
|
// have. The tests read its source instead, so they need no build first.
|
|
alias: { '@hanzo/cards': fileURLToPath(new URL('../cards/src/index.ts', import.meta.url)) },
|
|
},
|
|
test: {
|
|
include: ['test/**/*.test.ts'],
|
|
environment: 'node',
|
|
},
|
|
});
|