console/integration-tests/jest-setup.ts
renovate[bot] 1afe0ec73a
Update dependency @theguild/prettier-config to v1 (#676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-11-24 10:00:41 +00:00

20 lines
639 B
TypeScript

import { createPool } from 'slonik';
import * as utils from '@n1ru4l/dockest/test-helper';
import { resetDb } from './testkit/db';
import { resetClickHouse } from './testkit/clickhouse';
import { resetRedis } from './testkit/redis';
const dbAddress = utils.getServiceAddress('db', 5432);
const redisAddress = utils.getServiceAddress('redis', 6379);
const pool = createPool(`postgresql://postgres:postgres@${dbAddress}/registry`);
beforeEach(async () => resetDb(await pool));
beforeEach(() => resetClickHouse());
beforeEach(() =>
resetRedis({
host: redisAddress.replace(':6379', ''),
port: 6379,
password: 'test',
}),
);