mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-01 22:15:14 +02:00
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.
21 lines
846 B
TypeScript
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,
|
|
},
|
|
});
|