events-backend: skip tests if postgres tests are skipped

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-10-08 00:43:57 +02:00
parent 0d74ac9e71
commit 809776acd7
2 changed files with 11 additions and 5 deletions
@@ -41,11 +41,14 @@ async function migrateUntilBefore(knex: Knex, target: string): Promise<void> {
jest.setTimeout(60_000);
describe('migrations', () => {
const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
const maybeDescribe =
databases.eachSupportedId().length > 0 ? describe : describe.skip;
maybeDescribe('migrations', () => {
it.each(databases.eachSupportedId())(
'20240523100528_init.js, %p',
async databaseId => {
@@ -27,7 +27,10 @@ const databases = TestDatabases.create({
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
});
describe('DatabaseEventBusStore', () => {
const maybeDescribe =
databases.eachSupportedId().length > 0 ? describe : describe.skip;
maybeDescribe('DatabaseEventBusStore', () => {
it.each(databases.eachSupportedId())(
'should clean up old events, %p',
async databaseId => {