Skip to content

Commit

Permalink
Fix some cyclic types
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/react-native#43630

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D55271602

fbshipit-source-id: cb93fae6231ade6e5865dd7e0756a12568dece12
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Mar 23, 2024
1 parent 96c6b89 commit e87b0c3
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ const FIXTURES_DIR = join(__dirname, '..', '__fixtures__');
// Crawlers may return the target for symlinks *if* they can do so efficiently,
// (Watchman with symlink_target), but otherwise they should return 1 and
// defer to the caller. This matcher helps with nested expectations.
declare var expect: {...expect, oneOf: () => {}};
declare var expect: {
/** The object that you want to make assertions against */
(value: mixed, description?: string): JestExpectType,
extend(matchers: {[name: string]: JestMatcher, ...}): void,
assertions(expectedAssertions: number): void,
any(value: mixed): JestAsymmetricEqualityType,
oneOf: (mixed, mixed) => boolean,
...
};

function oneOf(this: $FlowFixMe, actual: mixed, ...expectOneOf: mixed[]) {
const pass = expectOneOf.includes(actual);
return {
Expand Down

0 comments on commit e87b0c3

Please sign in to comment.