fix unit test

This commit is contained in:
ismail simsek
2025-05-25 21:36:23 +02:00
parent 4229fd02de
commit 5535ff6b5c
2 changed files with 1 additions and 3 deletions
@@ -26,7 +26,6 @@ function setup(app: CoreApp): { onRunQuery: jest.Mock } {
const dataSource = {
getPrometheusTime: jest.fn((date, roundup) => 123),
getQueryHints: jest.fn(() => []),
getDebounceTimeInMilliseconds: jest.fn(() => 300),
languageProvider: {
start: () => Promise.resolve([]),
syntax: () => {},
@@ -23,7 +23,6 @@ const createMockDatasource = () => {
getVariables: jest.fn().mockReturnValue(['$var1', '$var2']),
interpolateString: jest.fn((str) => str),
hasLabelsMatchAPISupport: jest.fn().mockReturnValue(true),
getDebounceTimeInMilliseconds: jest.fn().mockReturnValue(300),
lookupsDisabled: false,
languageProvider: {
fetchLabels: jest.fn().mockResolvedValue({}),
@@ -126,7 +125,7 @@ describe('MetricsLabelsSection', () => {
// Check that LabelFilters was called with correct props
expect(LabelFilters).toHaveBeenCalledWith(
expect.objectContaining({
debounceDuration: 300,
debounceDuration: 350,
labelsFilters: defaultQuery.labels,
variableEditor: undefined,
}),