mirror of https://github.com/buster-so/buster.git
try again
This commit is contained in:
parent
d7eab3023c
commit
af243099ea
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue