first (part 3: src directory)
Deploy Iddaai Backend / build-and-deploy (push) Successful in 33s

This commit is contained in:
2026-04-16 15:12:27 +03:00
parent 2f0b85a0c7
commit 182f4aae16
125 changed files with 22552 additions and 0 deletions
@@ -0,0 +1,34 @@
import { FeederService } from '../modules/feeder/feeder.service';
import { HistoricalResultsSyncTask } from './historical-results-sync.task';
describe('HistoricalResultsSyncTask', () => {
const runPreviousDayCompletedMatchesScan = jest.fn();
let task: HistoricalResultsSyncTask;
beforeEach(() => {
jest.clearAllMocks();
delete process.env.FEEDER_MODE;
task = new HistoricalResultsSyncTask({
runPreviousDayCompletedMatchesScan,
} as unknown as FeederService);
});
afterEach(() => {
delete process.env.FEEDER_MODE;
});
it('calls feeder service in normal mode', async () => {
await task.syncPreviousDayCompletedMatches();
expect(runPreviousDayCompletedMatchesScan).toHaveBeenCalledTimes(1);
});
it('skips execution in historical feeder mode', async () => {
process.env.FEEDER_MODE = 'historical';
await task.syncPreviousDayCompletedMatches();
expect(runPreviousDayCompletedMatchesScan).not.toHaveBeenCalled();
});
});