Files
lasuite-docs/src/yhub-server/vitest.config.mts
T
Anthony LCandManuel Raynaud 4307dbafb8 🏷️(yhub) migrate yhub-server to typescript
Convert the yhub-server source and tests from plain JS/mjs to
TypeScript: move sources under src/, add tsconfig, tsconfig.build,
eslint flat config and nodemon config, and update the Dockerfile,
compose and CI workflow for the build step.
2026-09-23 12:06:05 +02:00

21 lines
846 B
TypeScript

import { defineConfig } from 'vitest/config';
// The unit suite: `__tests__/*.spec.ts`, none of which needs redis, postgres or
// S3 — `@y/hub`, its S3 plugin and the AWS SDK are faked, `@y/y` is real.
export default defineConfig({
test: {
include: ['__tests__/**/*.spec.ts'],
// migration.ts reads SOFT_MIGRATION and the LEGACY_S3_* variables at import
// time and builds (or refuses to build) its S3 client from them. The specs
// that need a live client set the variables themselves before importing the
// module; this is only the floor, so an unset environment cannot make the
// module throw on load in the specs that mock it instead.
env: {
SOFT_MIGRATION: 'false',
},
// each spec file resets modules and re-imports with its own environment
isolate: true,
clearMocks: true,
},
});