Browse Source

style: fix formatting (#274)

main
Justin Poehnelt 3 years ago committed by GitHub
parent
commit
23a4b20f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/label.test.ts
  2. 6
      src/marker.test.ts
  3. 2
      tsconfig.json

4
src/label.test.ts

@ -23,13 +23,13 @@ beforeAll(() => {
initialize(); initialize();
google.maps.OverlayView = OverlayView as any; google.maps.OverlayView = OverlayView as any;
Label.prototype.getProjection = (): google.maps.MapCanvasProjection => { Label.prototype.getProjection = (): google.maps.MapCanvasProjection => {
return ({ return {
fromPointToLatLng: () => {}, fromPointToLatLng: () => {},
fromLatLngToPoint: () => {}, fromLatLngToPoint: () => {},
fromLatLngToDivPixel: (position: google.maps.LatLng) => { fromLatLngToDivPixel: (position: google.maps.LatLng) => {
return { x: 1, y: 3 }; return { x: 1, y: 3 };
}, },
} as unknown) as google.maps.MapCanvasProjection; } as unknown as google.maps.MapCanvasProjection;
}; };
}); });

6
src/marker.test.ts

@ -24,13 +24,13 @@ beforeAll(() => {
initialize(); initialize();
google.maps.OverlayView = OverlayView as any; google.maps.OverlayView = OverlayView as any;
Label.prototype.getProjection = (): google.maps.MapCanvasProjection => { Label.prototype.getProjection = (): google.maps.MapCanvasProjection => {
return ({ return {
fromPointToLatLng: () => {}, fromPointToLatLng: () => {},
fromLatLngToPoint: () => {}, fromLatLngToPoint: () => {},
fromLatLngToDivPixel: (position: google.maps.LatLng) => { fromLatLngToDivPixel: (position: google.maps.LatLng) => {
return { x: 1, y: 3 }; return { x: 1, y: 3 };
}, },
} as unknown) as google.maps.MapCanvasProjection; } as unknown as google.maps.MapCanvasProjection;
}; };
}); });
@ -55,7 +55,7 @@ test("init should not pass extended options", () => {
}); });
test("should have listeners after multiple calls to setMap", () => { test("should have listeners after multiple calls to setMap", () => {
const map = (jest.fn() as any) as google.maps.Map; const map = jest.fn() as any as google.maps.Map;
(google.maps.Marker.prototype.getMap as jest.Mock).mockImplementation(() => { (google.maps.Marker.prototype.getMap as jest.Mock).mockImplementation(() => {
return map; return map;
}); });

2
tsconfig.json

@ -9,7 +9,7 @@
"lib": ["DOM", "ESNext"], "lib": ["DOM", "ESNext"],
"target": "ES6", "target": "ES6",
"moduleResolution": "node", "moduleResolution": "node",
"skipLibCheck": true, "skipLibCheck": true
}, },
"include": ["src/**/*"] "include": ["src/**/*"]
} }

Loading…
Cancel
Save