mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 14:33:33 -04:00
dbdb67561f
link https://gitee.com/openharmony/applications_settings/issues/I4MBU6 Signed-off-by: yangpeng85 <yangpeng85@huawei.com>
23 lines
897 B
JavaScript
23 lines
897 B
JavaScript
import { paramMock } from "../utils"
|
|
|
|
export function mockSettings() {
|
|
const settingsMock = {
|
|
getUri: function (...args) {
|
|
console.warn("settings.getUri interface mocked in the Previewer. How this interface works on the" +
|
|
" Previewer may be different from that on a real device.");
|
|
return paramMock.paramStringMock;
|
|
},
|
|
getValue: function (...args) {
|
|
console.warn("settings.getValue interface mocked in the Previewer. How this interface works on the" +
|
|
" Previewer may be different from that on a real device.");
|
|
return paramMock.paramStringMock;
|
|
},
|
|
setValue: function (...args) {
|
|
console.warn("settings.setValue interface mocked in the Previewer. How this interface works on the" +
|
|
" Previewer may be different from that on a real device.");
|
|
return paramMock.paramBooleanMock;
|
|
},
|
|
};
|
|
return settingsMock;
|
|
}
|