提交 dfb94557 编写于 作者: Anne_LXM's avatar Anne_LXM 提交者: 雪洛

调整map测试例

上级 0d448bb1
...@@ -41,11 +41,13 @@ describe('web-map', () => { ...@@ -41,11 +41,13 @@ describe('web-map', () => {
await page.callMethod('handleGetRegion') await page.callMethod('handleGetRegion')
await page.waitFor(500); await page.waitFor(500);
const regionRes = await page.data('getRegionTest') const regionRes = await page.data('getRegionTest')
const getRegionExpected = { console.log('regionRes', regionRes);
southwest: { latitude: 39.88334279187766, longitude: 116.31050146728515 }, const {southwest,northeast} = regionRes;
northeast: { latitude: 40.0149408585477, longitude: 116.56799353271484 }, const southwestExp ={ latitude: 39.88334279187766, longitude: 116.31050146728515 }
errMsg: 'getRegion:ok' const northeastExp ={ latitude: 40.0149408585477, longitude: 116.56799353271484 }
} expect(southwest.latitude).toBeCloseTo(southwestExp.latitude, 3);
expect(regionRes).toEqual(expect.objectContaining(getRegionExpected)); expect(southwest.longitude).toBeCloseTo(southwestExp.longitude, 3);
expect(northeast.latitude).toBeCloseTo(northeastExp.latitude, 3);
expect(northeast.longitude).toBeCloseTo(northeastExp.longitude, 3);
}); });
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册