Skip to content

Commit

Permalink
Update AppState Jest Mock
Browse files Browse the repository at this point in the history
Summary:
Updates the AppState Jest mock to correspond to recent API changes.

Changelog:
[General][Fixed] - Updated AppState Jest mock to match new public API

Reviewed By: yungsters

Differential Revision: D26295371

fbshipit-source-id: e6e39f23d9100f0eacf257f45d509c5364dcb28d
  • Loading branch information
Shaozhen Zhang authored and facebook-github-bot committed Feb 6, 2021
1 parent e2263b3 commit b28fa2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ jest
),
)
.mock('../Libraries/AppState/AppState', () => ({
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
addEventListener: jest.fn(() => ({
remove: jest.fn(),
})),
}))
.mock('../Libraries/Linking/Linking', () => ({
openURL: jest.fn(),
Expand Down

0 comments on commit b28fa2d

Please sign in to comment.