!681 continueMission js mock

Merge pull request !681 from 王洋/master
This commit is contained in:
openharmony_ci 2022-10-10 02:56:47 +00:00 committed by Gitee
commit c54b752cae
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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