Skip to content

Commit

Permalink
Merge pull request hupe1980#6 from dh-hosseini/master
Browse files Browse the repository at this point in the history
feat: Implement Polygon and Polyline mock
  • Loading branch information
hupe1980 authored Apr 9, 2021
2 parents 1ba6870 + 9a45a88 commit 30e5b7f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/createGoogleMapsMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,16 @@ const createGoogleMapsMock = (libraries = []) => {
},
OverlayView: function() {},
Point: function() {},
Polygon: function() {},
Polyline: function() {},
Polygon: jest.fn().mockImplementation(function (opts) {
this.opts = opts;
createMVCObject(this);
createMockFuncsFromArray(this, ['setDraggable', 'setEditable', 'setMap', 'setOptions', 'setPath', 'setPaths', 'setVisible']);
}),
Polyline: jest.fn().mockImplementation(function (opts) {
this.opts = opts;
createMVCObject(this);
createMockFuncsFromArray(this, ['setDraggable', 'setEditable', 'setMap', 'setOptions', 'setPath', 'setVisible']);
}),
Rectangle: function() {},
SaveWidget: function() {},
ScaleControlStyle: {
Expand Down

0 comments on commit 30e5b7f

Please sign in to comment.