From 9ab66bb66d7ff732bc4a99020f9b19a2f553f659 Mon Sep 17 00:00:00 2001 From: r00559040 Date: Fri, 17 Jun 2022 16:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9error=E6=9C=AA=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E5=B0=B1=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: r00559040 --- .../src/main/ets/test/GetAbilityLabelJsUnit.test.ets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets index 02d607140..c34be3094 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets @@ -78,7 +78,7 @@ export default function getAbilityLabel() { */ it('getAbilityLabel_test_0300', 0, async function (done) { await Bundle.getAbilityLabel(BUNDLE_NAME, SERVICE_ABILITY_NAME).then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { expect(error).assertEqual(1); }); @@ -97,14 +97,14 @@ export default function getAbilityLabel() { it('getAbilityLabel_test_0400', 0, async function (done) { let timeOldStamp = await Utils.getNowTime(); await Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR).then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { let timeNewStamp = Utils.getNowTime(); Utils.getDurationTime('[getAbilityLabel_test_0400]', timeOldStamp, timeNewStamp); expect(error).assertEqual(1); }); await Bundle.getAbilityLabel("", "").then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { expect(error).assertEqual(1); }); @@ -129,17 +129,17 @@ export default function getAbilityLabel() { */ it('getAbilityLabel_test_0500', 0, async function (done) { await Bundle.getAbilityLabel(undefined, OTHER_ABILITY_NAME).then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { expect(error).assertEqual(2); }); await Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, undefined).then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { expect(error).assertEqual(2); }); await Bundle.getAbilityLabel(undefined, undefined).then((data) => { - expect(error).assertFail(); + expect(data).assertFail(); }).catch((error) => { expect(error).assertEqual(2); }); -- GitLab