mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 20:44:48 -04:00
@@ -59,7 +59,7 @@ import { mockStorage } from './system_storage'
|
||||
import { mockRdb } from './ohos_data_rdb'
|
||||
import { mockPreferences } from './ohos_data_preferences'
|
||||
import { mockDataShare } from './ohos_data_dataShare'
|
||||
import { DataSharePredicates } from './ohos_data_dataSharePredicates'
|
||||
import { mockDataSharePredicates } from './ohos_data_dataSharePredicates'
|
||||
import { DataShareResultSet } from './ohos_data_DataShareResultSet'
|
||||
import { mockInputDevice } from './ohos_multimodalInput_inputDevice'
|
||||
import { mockVibrator } from './ohos_vibrator'
|
||||
@@ -358,8 +358,8 @@ export function mockRequireNapiFun() {
|
||||
return mockPreferences();
|
||||
case "data.dataShare":
|
||||
return mockDataShare();
|
||||
case "data.DataSharePredicates":
|
||||
return DataSharePredicates();
|
||||
case "data.dataSharePredicates":
|
||||
return mockDataSharePredicates();
|
||||
case "data.DataShareResultSet":
|
||||
return DataShareResultSet();
|
||||
case "data.dataAbility":
|
||||
|
||||
@@ -31,6 +31,11 @@ export function mockDataShareExtensionAbility() {
|
||||
console.warn("application.DataShareExtensionAbility.getFileTypes interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return [paramMock.paramStringMock];
|
||||
};
|
||||
this.openFile = function () {
|
||||
console.warn("application.DataShareExtensionAbility.openFile interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramNumberMock;
|
||||
};
|
||||
this.insert = function () {
|
||||
console.warn("application.DataShareExtensionAbility.insert interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
@@ -74,5 +79,5 @@ export function mockDataShareExtensionAbility() {
|
||||
};
|
||||
}
|
||||
}
|
||||
return new DataShareExtensionAbilityClass();
|
||||
return DataShareExtensionAbilityClass;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ export const DataShareResultSetMock = {
|
||||
return paramMock.paramNumberMock;
|
||||
},
|
||||
close: function () {
|
||||
console.warn("ResultSet.isColumnNull interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
console.warn("ResultSet.close interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
*/
|
||||
|
||||
import { paramMock } from "../utils"
|
||||
export function DataSharePredicates() {
|
||||
const DataSharePredicatesClass = class data_DataSharePredicates {
|
||||
export function mockDataSharePredicates() {
|
||||
const DataSharePredicatesClass = class DataSharePredicate {
|
||||
constructor() {
|
||||
this.equalTo = function (...args) {
|
||||
console.warn("DataSharePredicates.equalTo interface mocked in the Previewer. How this interface works on the" +
|
||||
|
||||
Reference in New Issue
Block a user