mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 11:20:27 -06:00
Stub deprecation warning in kbn unit tests (#45313)
This commit is contained in:
parent
8bf2e642aa
commit
820a70f49a
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user