diff --git a/public/app/core/utils/kbn.test.ts b/public/app/core/utils/kbn.test.ts index d6187c90995..1ebae32ecc1 100644 --- a/public/app/core/utils/kbn.test.ts +++ b/public/app/core/utils/kbn.test.ts @@ -1,6 +1,13 @@ import kbn from './kbn'; import { DecimalCount, TimeZone } from '@grafana/data'; +// Most of the methods in this file are deprecated +// Stub the deprecation warning here to prevent polluting the test output +jest.mock('@grafana/data', () => ({ + ...jest.requireActual('@grafana/data'), + deprecationWarning: () => {}, +})); + interface ValueFormatTest { id: string; decimals?: DecimalCount; diff --git a/public/app/core/utils/kbn.ts b/public/app/core/utils/kbn.ts index 6b797dbf047..d4ff3e73d72 100644 --- a/public/app/core/utils/kbn.ts +++ b/public/app/core/utils/kbn.ts @@ -50,7 +50,7 @@ const kbn = { addSlashes: (str: string) => str.replace(/[\'\"\\0]/g, '\\$&'), /** @deprecated since 7.2, use grafana/data */ describeInterval: (str: string) => { - deprecationWarning('kbn.ts', 'kbn.stringToJsRegex()', '@grafana/data'); + deprecationWarning('kbn.ts', 'kbn.describeInterval()', '@grafana/data'); return rangeUtil.describeInterval(str); }, /** @deprecated since 7.2, use grafana/data */