mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
// Type definitions for jest-each 0.3
|
|
// Project: https://github.com/facebook/jest
|
|
// Definitions by: Michael Utz <https://github.com/theutz>, Nick McCurdy <https://github.com/nickmccurdy>
|
|
// Definitions: <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
|
// TypeScript Version: 2.2
|
|
|
|
export default JestEach;
|
|
|
|
declare function JestEach(parameters: any[][]): JestEach.ReturnType;
|
|
|
|
declare namespace JestEach {
|
|
type SyncCallback = (...args: any[]) => void;
|
|
type AsyncCallback = () => void;
|
|
|
|
type TestCallback = SyncCallback | AsyncCallback;
|
|
|
|
type TestFn = (name: string, fn: TestCallback) => void;
|
|
type DescribeFn = (name: string, fn: SyncCallback) => void;
|
|
|
|
interface TestObj {
|
|
(name: string, fn: TestCallback): void;
|
|
only: TestFn;
|
|
skip: TestFn;
|
|
}
|
|
|
|
interface DescribeObj {
|
|
(name: string, fn: SyncCallback): void;
|
|
only: DescribeFn;
|
|
skip: DescribeFn;
|
|
}
|
|
|
|
interface ReturnType {
|
|
test: TestObj;
|
|
it: TestObj;
|
|
fit: TestFn;
|
|
xit: TestFn;
|
|
xtest: TestFn;
|
|
describe: DescribeObj;
|
|
fdescribe: DescribeFn;
|
|
xdescribe: DescribeFn;
|
|
}
|
|
}
|