!712 enterprise device manager返回值变更

Merge pull request !712 from 蔡明港/master
This commit is contained in:
openharmony_ci 2022-10-09 07:55:31 +00:00 committed by Gitee
commit 0bb851f420
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -46,10 +46,10 @@ export function mockEnterpriseDeviceManager() {
" 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.paramBooleanMock);
args[len - 1].call(this, paramMock.businessErrorMock);
} else {
return new Promise((resolve) => {
resolve(paramMock.paramBooleanMock);
resolve();
})
}
},
@ -58,10 +58,10 @@ export function mockEnterpriseDeviceManager() {
" 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.paramBooleanMock);
args[len - 1].call(this, paramMock.businessErrorMock);
} else {
return new Promise((resolve) => {
resolve(paramMock.paramBooleanMock);
resolve();
})
}
},
@ -70,10 +70,10 @@ export function mockEnterpriseDeviceManager() {
" 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.paramBooleanMock);
args[len - 1].call(this, paramMock.businessErrorMock);
} else {
return new Promise((resolve) => {
resolve(paramMock.paramBooleanMock);
resolve();
})
}
},
@ -106,10 +106,10 @@ export function mockEnterpriseDeviceManager() {
" 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.paramBooleanMock);
args[len - 1].call(this, paramMock.businessErrorMock);
} else {
return new Promise((resolve) => {
resolve(paramMock.paramBooleanMock);
resolve();
})
}
},