diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets index 53e33352434e067ffbd2dc2736819254ea8c975f..481d77a3c83bd2d9598a5475902946d738b3c52d 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets @@ -78,7 +78,7 @@ export default function getAbilityLabelJsUnit() { */ 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 getAbilityLabelJsUnit() { 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 getAbilityLabelJsUnit() { */ 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); });