Files
seaside_wu f80b54986b fix js api mock clerical error
Signed-off-by: seaside_wu <wuhaibin5@huawei.com>
Change-Id: I325a598e7ba5a9e99dbd8e97f20347bb0753b046
2021-10-25 20:29:41 +08:00

12 lines
432 B
JavaScript

import { hasComplete } from "./utils"
export function mockSystemPackage() {
global.systemplugin.package = {
hasInstalled: function (...args) {
console.warn("package.hasInstalled interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")
args[0].success(true)
hasComplete(args[0].complete)
}
}
}