mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 13:09:22 -06:00
3ef9cac640
* 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
18 lines
680 B
TypeScript
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>;
|
|
}
|
|
}
|
|
}
|