diff --git a/arkcompiler/esmodule/esmodule_entry/Test.json b/arkcompiler/esmodule/esmodule_entry/Test.json index a36d26f8f757b6f3e09924c7915cc68e23c9459e..be8ec183b2f08a91d6d77c3560c5bcaab1f292fb 100644 --- a/arkcompiler/esmodule/esmodule_entry/Test.json +++ b/arkcompiler/esmodule/esmodule_entry/Test.json @@ -5,7 +5,8 @@ "test-timeout": "1800000", "bundle-name": "com.esmodule.acts", "module-name": "entry", - "shell-timeout": "180000" + "shell-timeout": "180000", + "compile-mode": "esmodule" }, "kits": [ { diff --git a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestAbility/TestAbility.ets b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestAbility/TestAbility.ets index 290f6891e72ab22a89bd2aac6c87a958fb54e1bf..28e3b3be26b9bda260abd03672abca56adac9e12 100644 --- a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestAbility/TestAbility.ets +++ b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestAbility/TestAbility.ets @@ -21,7 +21,7 @@ import window from '@ohos.window'; import { BusinessError } from '@ohos.base'; export default class TestAbility extends UIAbility { - onCreate(want, launchParam) { + onCreate(want: object, launchParam: object) { hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); diff --git a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/test/WorkerImport.ets b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/test/WorkerImport.ets index 23fbafebd0a8adaab66c04f3ff393cb91d9c4586..0facff251d3729fec7fc82bdca9eb4234dd9c3c6 100644 --- a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/test/WorkerImport.ets +++ b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/test/WorkerImport.ets @@ -18,16 +18,6 @@ import {Sleep} from './Util' export default function workerImport() { describe("WorkerImportTest", () => { - it('importHar', 0, async () => { - let workerImportHar = 'failed' - let threadWorker = new worker.ThreadWorker('entry/ets/workers/workerImportHar') - threadWorker.postMessage("ModuleTest host to worker") - threadWorker.onmessage = () => { - workerImportHar = 'success'; - } - await Sleep(2000) - expect(workerImportHar).assertEqual('success') - }) it('importOhpm', 0, async () => { let workerImportOhpm = 'failed' let threadWorker = new worker.ThreadWorker('entry/ets/workers/workerImportOhpm') diff --git a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/testrunner/OpenHarmonyTestRunner.ts similarity index 100% rename from arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts rename to arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/testrunner/OpenHarmonyTestRunner.ts diff --git a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportHar.ets b/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportHar.ets deleted file mode 100644 index b5cbbfa0636a32066a1ad8ccbf439bd26dc388cd..0000000000000000000000000000000000000000 --- a/arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportHar.ets +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {ohpmRes} from 'har'; -import worker from '@ohos.worker'; - -let workerPort = worker.workerPort; -workerPort.onmessage = () => { - if (ohpmRes) { - workerPort.postMessage('ModuleTest receive data from main thread'); - } -}; \ No newline at end of file diff --git a/arkcompiler/esmodule/esmodule_ohostest/Test.json b/arkcompiler/esmodule/esmodule_ohostest/Test.json index ce403928d0dbf947cf2dffc7a198b71637d572b5..94ea6936a9d168a25c6eb4b14ce57793f9046f66 100644 --- a/arkcompiler/esmodule/esmodule_ohostest/Test.json +++ b/arkcompiler/esmodule/esmodule_ohostest/Test.json @@ -5,7 +5,8 @@ "test-timeout": "1800000", "bundle-name": "com.esmodule.acts", "module-name": "entry_test", - "shell-timeout": "180000" + "shell-timeout": "180000", + "compile-mode": "esmodule" }, "kits": [ { diff --git a/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestAbility/TestAbility.ets b/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestAbility/TestAbility.ets index 585a3254a5da1636fc7019011adebd8ab8dbd35a..791e4ce042e9919aa0076377fcaa20eb99e36085 100644 --- a/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestAbility/TestAbility.ets +++ b/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestAbility/TestAbility.ets @@ -21,7 +21,7 @@ import window from '@ohos.window'; import { BusinessError } from '@ohos.base'; export default class TestAbility extends UIAbility { - onCreate(want, launchParam) { + onCreate(want: object, launchParam: object) { hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); diff --git a/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts b/arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts similarity index 100% rename from arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts rename to arkcompiler/esmodule/esmodule_ohostest/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts diff --git a/arkcompiler/esmodule/esmodule_ohostestlib/Test.json b/arkcompiler/esmodule/esmodule_ohostestlib/Test.json index ce403928d0dbf947cf2dffc7a198b71637d572b5..94ea6936a9d168a25c6eb4b14ce57793f9046f66 100644 --- a/arkcompiler/esmodule/esmodule_ohostestlib/Test.json +++ b/arkcompiler/esmodule/esmodule_ohostestlib/Test.json @@ -5,7 +5,8 @@ "test-timeout": "1800000", "bundle-name": "com.esmodule.acts", "module-name": "entry_test", - "shell-timeout": "180000" + "shell-timeout": "180000", + "compile-mode": "esmodule" }, "kits": [ {