Skip to content

Commit 3ec9bcb

Browse files
Make check for number of calls more readable
1 parent 0a64723 commit 3ec9bcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layer/__tests__/WmsLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test('WmsLayer.getMap makes an appropriate request', () => {
5656
};
5757
layer.getMap(getMapParams, ApiType.WMS);
5858

59-
expect(axios.get.mock.calls.length).toBe(1);
59+
expect(axios.get).toHaveBeenCalledTimes(1);
6060

6161
const call: any = axios.get.mock.calls[0]; // cast to `any` so we can access the parameters
6262
const [url, axiosParams] = call;

0 commit comments

Comments
 (0)