Skip to content

Implement mocks for google.maps.geometry #299

@plgagnon2

Description

@plgagnon2
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

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions