mirror of
https://gitee.com/openharmony/third_party_jsframework
synced 2024-11-27 00:40:37 +00:00
!495 add batchInsert mock interface
Merge pull request !495 from wangxiyue/master
This commit is contained in:
commit
1e6285e2ae
@ -228,6 +228,18 @@ export function mockRdb() {
|
||||
})
|
||||
}
|
||||
},
|
||||
batchInsert: function (...args) {
|
||||
console.warn("RdbStore.batchInsert 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 (len > 0 && typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock, paramMock.paramNumberMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(paramMock.paramNumberMock);
|
||||
})
|
||||
}
|
||||
},
|
||||
update: function (...args) {
|
||||
console.warn("RdbStore.update interface mocked in the Previewer. How this interface works on the" +
|
||||
" Previewer may be different from that on a real device.")
|
||||
|
Loading…
Reference in New Issue
Block a user