mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
continue Mission js mock
Signed-off-by: wangyang2022 <wangyang412@huawei.com> Change-Id: I9dc648939cd8ee64a0b5e45336bbaed9a70ea711
This commit is contained in:
@@ -64,6 +64,18 @@ export function mockDistributedMissionManager() {
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
},
|
||||
continueMission: function (...args) {
|
||||
console.warn('distributedMissionManager.continueMission 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);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return distributedMissionManager
|
||||
|
||||
Reference in New Issue
Block a user