1"use strict"; 2/* 3 * Copyright (c) 2022-2025 Huawei Device Co., Ltd. 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16Object.defineProperty(exports, "__esModule", { value: true }); 17exports.startTests = void 0; 18const hypium_1 = require("@ohos/hypium"); 19globalThis.__OpenHarmony = true; 20const suiteMap = new Map(); 21suite = (title, fn) => { 22 suiteMap.set(title, fn); 23}; 24suiteSetup = (title, fn) => { 25 (0, hypium_1.beforeEach)(fn); 26}; 27test = ((title, fn) => { 28 (0, hypium_1.it)(fn ? title : `[SKIP] ${title}`, hypium_1.Size.MEDIUMTEST, fn ? fn : () => { }); 29}); 30test.skip = (title, fn) => { 31 (0, hypium_1.it)(`[SKIP] ${title}`, hypium_1.Size.MEDIUMTEST, () => { }); 32}; 33performance = { 34 now: () => { 35 return Date.now(); 36 } 37}; 38function startTests(generateGolden = false) { 39 globalThis.__generateGolden = generateGolden; 40 suiteMap.forEach((fn, title) => { 41 (0, hypium_1.describe)(title, function () { 42 fn(); 43 }); 44 }); 45} 46exports.startTests = startTests; 47//# sourceMappingURL=index.js.map