test: Configures integration tests to run in src (#19640)

This commit is contained in:
Declan Carroll
2025-09-17 17:36:39 +01:00
committed by GitHub
parent 83181a7c20
commit 2598e735b1
25 changed files with 7 additions and 13 deletions

View File

@@ -14,6 +14,8 @@ module.exports = {
coveragePathIgnorePatterns: ['/src/databases/migrations/'],
testTimeout: 10_000,
prettierPath: null,
// Only run integration tests - exclude unit tests in src/
testPathIgnorePatterns: ['/dist/', '/node_modules/', '/src/'],
// Run integration tests from both test/integration and src/ directories
testRegex: undefined, // Override base config testRegex
testMatch: ['<rootDir>/test/integration/**/*.test.ts', '<rootDir>/src/**/*.integration.test.ts'],
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
};

View File

@@ -25,7 +25,7 @@
"test:sqlite": "N8N_LOG_LEVEL=silent DB_TYPE=sqlite jest --config=jest.config.integration.js --no-coverage",
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb DB_POSTGRESDB_SCHEMA=alt_schema DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
"test:mariadb": "N8N_LOG_LEVEL=silent DB_TYPE=mariadb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage",
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb DB_TABLE_PREFIX=test_ jest --config=jest.config.integration.js --no-coverage --maxWorkers=1",
"test:win": "pnpm test:sqlite:win",
"test:dev:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --watch",
"test:sqlite:win": "set N8N_LOG_LEVEL=silent&& set DB_TYPE=sqlite&& jest --config=jest.config.integration.js",

View File

@@ -50,7 +50,6 @@ describe('dataStore', () => {
});
afterEach(async () => {
// Clean up any created user data stores
await dataStoreService.deleteDataStoreAll();
});