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

Implement mocks for google.maps.geometry #299

Open
plgagnon2 opened this issue Aug 1, 2022 · 0 comments
Open

Implement mocks for google.maps.geometry #299

plgagnon2 opened this issue Aug 1, 2022 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@plgagnon2
Copy link

plgagnon2 commented Aug 1, 2022

describe('given xxx.service.tsx', () => {
    beforeEach(() => {
        initialize();
    });
    describe('when I xxx', () => {
        it('should yyy', () => {
            const xxxspy = jest.spyOn(google.maps.geometry.spherical, 'computeLength').mockReturnValue(1);

            const distance = xxx.getDistance(params)
            expect(distance).toEqual(yyy)

            xxxspy.mockRestore();
        });
    });
});

image

@plgagnon2 plgagnon2 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 1, 2022
@usefulthink usefulthink added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. triage me I really want to be triaged. labels Sep 29, 2023
@usefulthink usefulthink changed the title Cant mock google.maps.geometry.spherical.computeLength Implement mocks for google.maps.geometry\ Sep 29, 2023
@usefulthink usefulthink changed the title Implement mocks for google.maps.geometry\ Implement mocks for google.maps.geometry Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants