1/* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import regeneratorRuntime from 'babel-runtime/regenerator' 17 18import { 19 mockAbilityFeatureAbility, 20 mockAbilityParticleAbility, 21 mockAbilityFormManager, 22 mockAbilityContinuationRegisterManager, 23 mockAbilityAbilityAgent, 24 mockAbilityFormBindingData 25} from './ability' 26import { mockAppAbilityManager } from './ohos/app' 27 28import { mockBattery } from './battery' 29import { mockBrightness } from './brightness' 30import { mockOhosBluetooth } from './ohos/bluetooth' 31import { mockDistributedSchedule } from './distributedSchedule' 32import { mockFetch } from './fetch' 33import { mockFeatureAbility } from './featureAbility' 34import { mockGeolocation } from './geolocation' 35import { mockNotification } from './notification' 36import { mockCommonEvent } from './ohos/commonEvent' 37import { mockOhosRequest } from './ohos/request' 38import { mockSensor } from './sensor' 39import { mockStorage } from './storage' 40import { mockStorageInfoManager } from './ohos/storageInfoManager' 41import { mockSystemPackage } from './systemPackage' 42 43import { mockUserauth } from './userIAM' 44import { mockVibrator } from './vibrator' 45import { mockRequireNapiFun } from './napi' 46import { mockAI } from './ai' 47import { mockUserIAMUserAuth } from './ohos/userIAMuserAuth.js' 48import { mockBundleManager } from './ohos/bundleManager' 49import { mockPackageManager } from './ohos/packageManager' 50import { mockCalendar } from "./calendar" 51 52export function mockSystemPlugin() { 53 global.regeneratorRuntime = regeneratorRuntime 54 55 global.systemplugin = {} 56 global.ohosplugin = {} 57 58 mockNotification() 59 mockCommonEvent() 60 mockFetch() 61 mockStorage() 62 mockVibrator() 63 mockSensor() 64 mockGeolocation() 65 mockBattery() 66 mockBrightness() 67 mockSystemPackage() 68 mockFeatureAbility() 69 mockOhosBluetooth() 70 mockUserauth() 71 mockDistributedSchedule() 72 mockOhosRequest() 73 mockAbilityFeatureAbility() 74 mockAbilityContinuationRegisterManager() 75 mockRequireNapiFun() 76 mockAbilityParticleAbility() 77 mockAbilityFormManager() 78 mockAbilityAbilityAgent() 79 mockAbilityFormBindingData() 80 mockAI() 81 mockStorageInfoManager() 82 mockAppAbilityManager() 83 mockUserIAMUserAuth() 84 mockBundleManager() 85 mockPackageManager() 86 mockCalendar() 87} 88