language_provider.mock.ts 478 B

12345678910111213141516
  1. export class EmptyLanguageProviderMock {
  2. metrics = [];
  3. constructor() {}
  4. start() {
  5. return new Promise((resolve) => {
  6. resolve('');
  7. });
  8. }
  9. getLabelKeys = jest.fn().mockReturnValue([]);
  10. getLabelValues = jest.fn().mockReturnValue([]);
  11. getSeries = jest.fn().mockReturnValue({ __name__: [] });
  12. fetchSeries = jest.fn().mockReturnValue([]);
  13. fetchSeriesLabels = jest.fn().mockReturnValue([]);
  14. fetchLabels = jest.fn();
  15. loadMetricsMetadata = jest.fn();
  16. }