fix unit test
This commit is contained in:
@@ -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: () => {},
|
||||
|
||||
+1
-2
@@ -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,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user