jest-chain
Version:
Chain Jest matchers together to create one powerful assertion
20 lines (17 loc) • 517 B
TypeScript
/// <reference types="jest" />
declare namespace jest {
interface ChainedMatchers<T>
extends jest.JestMatchersShape<
Matchers<ChainedMatchers<T>, T>,
Matchers<Promise<ChainedMatchers<T>> & ChainedMatchers<T>, T>
> {}
interface Expect {
/**
* The `expect` function is used every time you want to test a value.
* You will rarely call `expect` by itself.
*
* @param actual The value to apply matchers against.
*/
<T = any>(actual: T): ChainedMatchers<T>;
}
}