Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions flow-typed/environment/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,33 @@ declare var describe: {
/**
* Only run this describe block
*/
only(name: JestTestName, fn: () => void): void,
only: {
(name: JestTestName, fn: () => void): void,
each(
...table:
| ReadonlyArray<ReadonlyArray<unknown> | unknown>
| [ReadonlyArray<string>, string]
): (
name: JestTestName,
fn?: (...args: ReadonlyArray<any>) => any,
timeout?: number,
) => void,
},
/**
* Skip running this describe block
*/
skip(name: JestTestName, fn: () => void): void,
skip: {
(name: JestTestName, fn: () => void): void,
each(
...table:
| ReadonlyArray<ReadonlyArray<unknown> | unknown>
| [ReadonlyArray<string>, string]
): (
name: JestTestName,
fn?: (...args: ReadonlyArray<any>) => any,
timeout?: number,
) => void,
},
/**
* each runs this test against array of argument arrays per each run
*
Expand Down Expand Up @@ -1136,11 +1158,7 @@ declare var it: {
...
};

declare function fit(
name: JestTestName,
fn: JestProvidesCallback,
timeout?: number,
): void;
declare var fit: typeof it.only;
/** An individual test unit */
declare var test: typeof it;
/** A disabled group of tests */
Expand Down
4 changes: 2 additions & 2 deletions private/react-native-fantom/__docs__/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ file.

The high level structure of Fantom tests is similar to Jest unit tests. However,
only a subset of Jest's Global API is currently available. For example,
`test.each` is not yet implemented in Fantom. We are working on adding more Jest
`test.todo` is not yet implemented in Fantom. We are working on adding more Jest
APIs. If you are blocked by the lack of a specific API, please reach out to us.

Most of the interesting APIs are available via the `@react-native/fantom`
Expand Down Expand Up @@ -351,7 +351,7 @@ expect(root.getRenderedOutput().toJSX()).toEqual(
### Limitations

- `Fantom.runTask()` calls cannot be nested — doing so will throw.
- Only a subset of Jest's Global API is available (e.g. `test.each` is not
- Only a subset of Jest's Global API is available (e.g. `test.todo` is not
implemented). Reach out if you're blocked by a specific missing API.
- Tests must live within `packages/react-native`; Fantom is not currently
intended for application-specific code.
Expand Down
Loading
Loading