Files
zeekayandHanzo Dev 1012f4d4ab Slack and Teams tests read @hanzo/cards from source
@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]>
2026-09-19 04:37:08 -07:00

25 lines
878 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: {
globals: true,
environment: 'node',
include: ['test/**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.ts'],
// The server opens a socket and the bot wires botbuilder at runtime; the
// pure logic they compose (dispatch/panels/context/hanzo/config/identity)
// is what we assert.
exclude: ['**/*.d.ts', '**/*.config.*', 'src/server.ts', 'src/index.ts'],
},
},
});