grafana/packages/grafana-data/typings/jest/index.d.ts
Andrej Ocenas 3ef9cac640
Tempo: Return new version of dataframe schema directly from the backend (#32116)
* Return dataframe directly from the backend

* Streamline some transforms

* Fix lint issues

* Remove unused lib

* Fix datasource test

* Fix imports and add some typings

* Fix the typings and some tests

* Add private doc comment

* Remove private tag

* Add comments

* Fix some API docs issues
2021-03-22 19:09:15 +01:00

18 lines
680 B
TypeScript

import { Observable } from 'rxjs';
type ObservableType<T> = T extends Observable<infer V> ? V : never;
declare global {
namespace jest {
interface Matchers<R, T = {}> {
toEmitValues<E = ObservableType<T>>(expected: E[]): Promise<CustomMatcherResult>;
/**
* Collect all the values emitted by the observables (also errors) and pass them to the expectations functions after
* the observable ended (or emitted error). If Observable does not complete within OBSERVABLE_TEST_TIMEOUT_IN_MS the
* test fails.
*/
toEmitValuesWith<E = ObservableType<T>>(expectations: (received: E[]) => void): Promise<CustomMatcherResult>;
}
}
}