commit 2 refactor
This commit is contained in:
parent
588f666943
commit
32e43c9243
310 changed files with 33318 additions and 31189 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { beforeEach, describe, expect, it, mock, type Mock } from 'bun:test';
|
||||
import type { Logger } from '@stock-bot/logger';
|
||||
import { processBatchJob, processItems } from '../src/batch-processor';
|
||||
import type { BatchJobData, ProcessOptions, Queue, QueueManager } from '../src/types';
|
||||
import type { BatchJobData, ProcessOptions, QueueManager } from '../src/types';
|
||||
|
||||
describe('Batch Processor', () => {
|
||||
type MockLogger = {
|
||||
|
|
@ -122,7 +121,7 @@ describe('Batch Processor', () => {
|
|||
});
|
||||
|
||||
// processBatchJob should still complete even if addBulk fails
|
||||
const result = await processBatchJob(
|
||||
const _result = await processBatchJob(
|
||||
batchData,
|
||||
'test-queue',
|
||||
mockQueueManager as unknown as QueueManager
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { beforeEach, describe, expect, it, mock } from 'bun:test';
|
||||
import { describe, expect, it, mock } from 'bun:test';
|
||||
import { Queue } from '../src/queue';
|
||||
import type { JobData, QueueWorkerConfig, RedisConfig } from '../src/types';
|
||||
import type { QueueWorkerConfig, RedisConfig } from '../src/types';
|
||||
|
||||
describe('Queue Class', () => {
|
||||
const mockRedisConfig: RedisConfig = {
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ describe.skip('QueueManager', () => {
|
|||
mockLogger
|
||||
);
|
||||
|
||||
const queue = manager.createQueue('test-queue');
|
||||
const _queue = manager.createQueue('test-queue');
|
||||
const stats = await manager.getQueueStats('test-queue');
|
||||
|
||||
expect(stats).toBeDefined();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { beforeEach, describe, expect, it, mock } from 'bun:test';
|
||||
import { describe, expect, it } from 'bun:test';
|
||||
import { createServiceCache, ServiceCache } from '../src/service-cache';
|
||||
import {
|
||||
generateCachePrefix,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue