mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 14:33:33 -04:00
@@ -1509,5 +1509,29 @@ export function mockBundleManager() {
|
||||
});
|
||||
}
|
||||
},
|
||||
getAllShortcutInfo: function (...args) {
|
||||
console.warn("bundle.getAllShortcutInfo 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, ShortcutInfosMock)
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
resolve(ShortcutInfosMock)
|
||||
});
|
||||
}
|
||||
},
|
||||
getModuleUsageRecords: function (...args) {
|
||||
console.warn("bundle.getModuleUsageRecords 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,ModeleUsageRecordsMock)
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
resolve(ModeleUsageRecordsMock)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user