Signed-off-by: lovechinamo <wangdongqi2@huawei.com>

Changes to be committed:
This commit is contained in:
lovechinamo
2022-07-19 17:16:31 +08:00
parent a9c3f6c8da
commit 10e8cebef9
@@ -48,6 +48,18 @@ export function mockWallpaper() {
})
}
},
getFile: function (...args) {
console.warn("wallpaper.getFile interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")
const len = args.length
if (typeof args[len - 1] === 'function') {
args[len - 1].call(this, paramMock.businessErrorMock, paramMock.paramNumberMock)
} else {
return new Promise((resolve, reject) => {
resolve(paramMock.paramNumberMock);
})
}
},
getMinHeight: function (...args) {
console.warn("wallpaper.getMinHeight interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")