1/**
2 * Copyright (c) 2024-2024 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 hilog from '@ohos.hilog';
17import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
18
19export default function abilityTest() {
20  describe('ActsAbilityTest', () => {
21    // Defines a test suite. Two parameters are supported: test suite name and test suite function.
22    beforeAll(() => {
23      // Presets an action, which is performed only once before all test cases of the test suite start.
24      // This API supports only one parameter: preset action function.
25    })
26    beforeEach(() => {
27      // Presets an action, which is performed before each unit test case starts.
28      // The number of execution times is the same as the number of test cases defined by **it**.
29      // This API supports only one parameter: preset action function.
30    })
31    afterEach(() => {
32      // Presets a clear action, which is performed after each unit test case ends.
33      // The number of execution times is the same as the number of test cases defined by **it**.
34      // This API supports only one parameter: clear action function.
35    })
36    afterAll(() => {
37      // Presets a clear action, which is performed after all test cases of the test suite end.
38      // This API supports only one parameter: clear action function.
39    })
40    it('assertContain', 0, () => {
41      // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
42      hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
43      let a = 'abc'
44      let b = 'b'
45      // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
46      expect(a).assertContain(b)
47      expect(a).assertEqual(a)
48    })
49  })
50}