feat: 优化单测模拟数据格式,避免eslint报错提示造成卡顿
This commit is contained in:
@@ -55,6 +55,7 @@ let wrapper = null
|
||||
function axiosPostAndMounted (Metric) {
|
||||
require('vue-router').useRoute.mockReturnValue({ query: {} })
|
||||
// 模拟localStorage获取数据
|
||||
// eslint-disable-next-line no-proto
|
||||
jest.spyOn(localStorage.__proto__, 'getItem').mockImplementation(key => linkInfo)
|
||||
// 模拟 axios 数据
|
||||
axios.get.mockResolvedValueOnce(mockGet)
|
||||
|
||||
Reference in New Issue
Block a user