tests
This commit is contained in:
parent
3a7254708e
commit
b63e58784c
41 changed files with 5762 additions and 4477 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { Queue as BullQueue, type Job } from 'bullmq';
|
||||
import type { CacheProvider } from '@stock-bot/cache';
|
||||
import { createCache } from '@stock-bot/cache';
|
||||
import type { HandlerRegistry } from '@stock-bot/handler-registry';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import { Queue as BullQueue, type Job } from 'bullmq';
|
||||
import { Queue, type QueueWorkerConfig } from './queue';
|
||||
import { QueueRateLimiter } from './rate-limiter';
|
||||
import { getFullQueueName, parseQueueName } from './service-utils';
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@ export function getRedisConnection(config: RedisConfig) {
|
|||
const isTest = process.env.NODE_ENV === 'test' || process.env['BUNIT'] === '1';
|
||||
|
||||
// In test mode, always use localhost
|
||||
const testConfig = isTest ? {
|
||||
host: 'localhost',
|
||||
port: 6379,
|
||||
} : config;
|
||||
const testConfig = isTest
|
||||
? {
|
||||
host: 'localhost',
|
||||
port: 6379,
|
||||
}
|
||||
: config;
|
||||
|
||||
const baseConfig = {
|
||||
host: testConfig.host,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue