Modify file name.

Signed-off-by: liukaii <liukai240@huawei.com>
This commit is contained in:
liukaii
2022-07-04 17:21:14 +08:00
parent d75c6f9790
commit b908a7c95f
2 changed files with 7 additions and 7 deletions
@@ -161,13 +161,13 @@ import { mockDefaultAppManager } from './ohos_bundle_defaultAppManager'
import { mockKeyEvent } from './ohos_multimodalInput_keyEvent'
import { mockMouseEvent } from './ohos_multimodalInput_mouseEvent'
import { mockTouchEvent } from './ohos_multimodalInput_touchEvent'
import { mockUiAppearance } from './ohos_uiappearance'
import { mockUiAppearance } from './ohos_uiAppearance'
export function mockRequireNapiFun() {
global.requireNapi = function (...args) {
switch (args[0]) {
case "file":
return mockFile();
case "uiappearance":
case "uiAppearance":
return mockUiAppearance();
case "resourceManager":
return mockResourceManager();
@@ -19,11 +19,11 @@ export function mockUiAppearance() {
const DarkMode = {
ALWAYS_DARK: 0,
ALWAYS_LIGHT: 1
};
const uiappearance = {
}
const uiAppearance = {
DarkMode,
setDarkMode: function (...args) {
console.warn("uiappearance.setDarkMode interface mocked in the Previewer." +
console.warn("uiAppearance.setDarkMode 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') {
@@ -35,10 +35,10 @@ export function mockUiAppearance() {
}
},
getDarkMode: function () {
console.warn("uiappearance.getDarkMode interface mocked in the Previewer." +
console.warn("uiAppearance.getDarkMode interface mocked in the Previewer." +
" How this interface works on the Previewer may be different from that on a real device.")
return DarkMode;
}
}
return uiappearance;
return uiAppearance;
}