diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets index 383d09bd93279a8a3c087eafd5024616bfd1fe81..95aa314b0391561d1490c404da4f85c5abaeb051 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets @@ -441,10 +441,8 @@ export default function getProfileByAbility() { */ it('getProfileByAbility_2500', 0, async function (done) { bundle.getProfileByAbility(MODULE_NAME, ABILITY_NAME, METADATA_NAME4, (err, data) => { - if (err) { - console.error('[getProfileByAbility_2500] Operation failed. Cause: ' + JSON.stringify(err)); - expect(err).assertEqual(1); - } + console.error('[getProfileByAbility_2500] Operation failed. Cause: ' + JSON.stringify(err)); + expect(err).assertEqual(1); console.info('[getProfileByAbility_2500] data is: ' + JSON.stringify(data)); expect(typeof data).assertEqual("string"); expect(data).assertEqual("GetProfile failed"); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets index 53a37182a360c7eebff6975a6f293c8f9de5bd1a..65bbd927e9079d464f8a7fdb5ee360d76beb3383 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets @@ -441,10 +441,8 @@ export default function getProfileByExtensionAbility() { */ it('getProfileByExtensionAbility_2500', 0, async function (done) { bundle.getProfileByExtensionAbility(MODULE_NAME, ABILITY_NAME, METADATA_NAME4, (err, data) => { - if (err) { - console.error('[getProfileByExtensionAbility_2500] Operation failed. Cause: ' + JSON.stringify(err)); - expect(err).assertEqual(1); - } + console.error('[getProfileByExtensionAbility_2500] Operation failed. Cause: ' + JSON.stringify(err)); + expect(err).assertEqual(1); console.info('[getProfileByExtensionAbility_2500] data is: ' + JSON.stringify(data)); expect(typeof data).assertEqual("string"); expect(data).assertEqual("GetProfile failed");