From cd872f23e4de45e18a5331a3dd1cd937dcea5126 Mon Sep 17 00:00:00 2001 From: ldfwz Date: Wed, 30 Jul 2025 09:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4test=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9deviceTypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/module.json5 | 4 +--- entry/src/test/List.test.ets | 5 ----- entry/src/test/LocalUnit.test.ets | 33 ------------------------------- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 entry/src/test/List.test.ets delete mode 100644 entry/src/test/LocalUnit.test.ets diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index a1cea8b..ad219d7 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -5,9 +5,7 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "phone" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/entry/src/test/List.test.ets b/entry/src/test/List.test.ets deleted file mode 100644 index bb5b5c3..0000000 --- a/entry/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/entry/src/test/LocalUnit.test.ets b/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 165fc16..0000000 --- a/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file -- Gitee