fix(integration-tests): auth with multiworkspace and skip clickhouse … (#11630)

…tests
This commit is contained in:
Antoine Moreaux
2025-04-17 16:49:57 +02:00
committed by GitHub
parent a7b75c61e8
commit 21c3edf8d6
3 changed files with 16 additions and 5 deletions

View File

@ -3,6 +3,7 @@ import { JestConfigWithTsJest, pathsToModuleNameMapper } from 'ts-jest';
import { NodeEnvironment } from 'src/engine/core-modules/twenty-config/interfaces/node-environment.interface';
const isBillingEnabled = process.env.IS_BILLING_ENABLED === 'true';
const isClickhouseEnabled = process.env.CLICKHOUSE_URL !== undefined;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const tsConfig = require('./tsconfig.json');
@ -16,9 +17,11 @@ const jestConfig: JestConfigWithTsJest = {
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
testEnvironment: 'node',
testRegex: isBillingEnabled
? '\\.integration-spec\\.ts$'
: '^(?!.*billing).*\\.integration-spec\\.ts$',
testPathIgnorePatterns: [
...(isBillingEnabled ? [] : ['<rootDir>/test/integration/billing']),
...(isClickhouseEnabled ? [] : ['<rootDir>/test/integration/analytics']),
],
testRegex: '\\.integration-spec\\.ts$',
modulePathIgnorePatterns: ['<rootDir>/dist'],
globalSetup: '<rootDir>/test/integration/utils/setup-test.ts',
globalTeardown: '<rootDir>/test/integration/utils/teardown-test.ts',