mock bugfix

Signed-off-by: hwx1119949 <3052854011@qq.com>
Change-Id: I95e65fb9e97656e6054c84d9dd32c5c5c6f184d7
This commit is contained in:
hwx1119949
2022-07-21 11:34:15 +08:00
parent 97438a73a6
commit 769b92d267
2 changed files with 15 additions and 16 deletions
@@ -191,7 +191,7 @@ export function mockRequireNapiFun() {
return mockZlib();
case "screenshot":
return mockScreenshot();
case "WantAgent":
case "wantAgent":
return mockWantAgent();
case "wallpaper":
return mockWallpaper();
@@ -15,18 +15,17 @@
import { paramMock } from "../utils"
export const WantClass = class Want {
constructor() {
console.warn('Want.constructor interface mocked in the Previewer. How this interface works on' +
' the Previewer may be different from that on a real device.');
this.deviceId = "[PC Preview] unknow deviceId";
this.bundleName = "[PC Preview] unknow bundleName";
this.abilityName = "[PC Preview] unknow abilityName";
this.uri = "[PC Preview] unknow uri";
this.type = "[PC Preview] unknow type";
this.flag = "[PC Preview] unknow flag";
this.action = "[PC Preview] unknow action";
this.parameters = {};
this.entities = [paramMock.paramStringMock];
this.moduleName = "[PC Preview] unknow moduleName";
}
}
constructor() {
this.deviceId = "[PC Preview] unknow deviceId";
this.bundleName = "[PC Preview] unknow bundleName";
this.abilityName = "[PC Preview] unknow abilityName";
this.uri = "[PC Preview] unknow uri";
this.type = "[PC Preview] unknow type";
this.flag = "[PC Preview] unknow flag";
this.action = "[PC Preview] unknow action";
this.parameters = {};
this.entities = [paramMock.paramStringMock];
this.moduleName = "[PC Preview] unknow moduleName";
}
}