try again

This commit is contained in:
dal 2025-09-26 10:24:39 -06:00
parent d7eab3023c
commit af243099ea
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 20 additions and 3 deletions

View File

@ -14,8 +14,8 @@ import {
import { wrapTraced } from 'braintrust';
import * as yaml from 'yaml';
import { z } from 'zod';
import { cleanupState } from '../../../shared/cleanup-state';
import { getDataSourceCredentials } from '../../../../utils/get-data-source';
import { cleanupState } from '../../../shared/cleanup-state';
import { createRawToolResultEntry } from '../../../shared/create-raw-llm-tool-result-entry';
import { trackFileAssociations } from '../../file-tracking-helper';
import { validateAndAdjustBarLineAxes } from '../helpers/bar-line-axis-validator';

View File

@ -14,8 +14,8 @@ import { wrapTraced } from 'braintrust';
import { eq, inArray } from 'drizzle-orm';
import * as yaml from 'yaml';
import { z } from 'zod';
import { cleanupState } from '../../../shared/cleanup-state';
import { getDataSourceCredentials } from '../../../../utils/get-data-source';
import { cleanupState } from '../../../shared/cleanup-state';
import { createRawToolResultEntry } from '../../../shared/create-raw-llm-tool-result-entry';
import { trackFileAssociations } from '../../file-tracking-helper';
import { validateAndAdjustBarLineAxes } from '../helpers/bar-line-axis-validator';

View File

@ -34,6 +34,23 @@ vi.mock('../../../shared/create-raw-llm-tool-result-entry', () => ({
}),
}));
vi.mock('../../../shared/cleanup-state', () => ({
cleanupState: vi.fn(),
}));
vi.mock('../../file-tracking-helper', () => ({
trackFileAssociations: vi.fn().mockResolvedValue(undefined),
}));
vi.mock('../helpers/metric-extraction', () => ({
extractAndCacheMetricsWithUserContext: vi.fn().mockResolvedValue(undefined),
extractMetricIds: vi.fn().mockReturnValue([]),
}));
vi.mock('../report-snapshot-cache', () => ({
updateCachedSnapshot: vi.fn(),
}));
import { updateMessageEntries } from '@buster/database/queries';
describe('create-reports-execute', () => {
@ -141,7 +158,7 @@ describe('create-reports-execute', () => {
});
it('should create initial entries on first execution', async () => {
state.initialEntriesCreated = undefined;
state.initialEntriesCreated = false;
state.file = undefined;
const input: CreateReportsInput = {