Files
smom-dbis-138/services/token-aggregation/jest.config.js

25 lines
917 B
JavaScript
Raw Normal View History

/**
* GRU transport API tests require `config/token-mapping-loader.cjs` to export
* getGruTransportMetadata + getActiveTransportPairs backed by `config/gru-transport-active.json`
* (see Proxmox docs/04-configuration/GRU_TRANSPORT_LOADER_DESIGN_SPEC.md). Run them explicitly:
* RUN_GRU_TRANSPORT_LOADER_TESTS=1 npm run test:ci
*/
const runGruTransportLoaderTests = process.env.RUN_GRU_TRANSPORT_LOADER_TESTS === '1';
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
testPathIgnorePatterns: runGruTransportLoaderTests
? []
: [
'/src/config/gru-transport\\.test\\.ts$',
'/src/api/routes/token-mapping\\.test\\.ts$',
'/src/api/routes/bridge\\.test\\.ts$',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
};