Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 915: Stop/start Location manager based on listeners registered. #999

Merged
merged 16 commits into from
Oct 2, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix userlocation test
  • Loading branch information
soumyashisPR committed Aug 26, 2020
commit b11ac63073ba1994a65d1a828ae911cc43b4cdfb
11 changes: 6 additions & 5 deletions __tests__/components/UserLocation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ describe('UserLocation', () => {
const {UNSAFE_queryByType} = render(
<UserLocation onPress={onPressCallback} />,
);

const shapeSource = UNSAFE_queryByType(ShapeSource);
fireEvent(shapeSource, 'onPress');
fireEvent(shapeSource, 'onPress');
expect(onPressCallback).toHaveBeenCalledTimes(2);
setTimeout(() => {
const shapeSource = UNSAFE_queryByType(ShapeSource);
fireEvent(shapeSource, 'onPress');
fireEvent(shapeSource, 'onPress');
expect(onPressCallback).toHaveBeenCalledTimes(2);
});
ferdicus marked this conversation as resolved.
Show resolved Hide resolved
});

test('correctly unmounts', async () => {
Expand Down