From 7c9398f99e0f29d8173ff3f20567f1a791d2bdef Mon Sep 17 00:00:00 2001 From: Lotol Date: Tue, 3 Jan 2023 10:59:30 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=EF=BC=9Adelete=20entryDir=20?= =?UTF-8?q?and=20moduleSourceDir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lotol --- .../test/ActsBmsEtsUnPermissionTest.test.ets | 6 +- .../src/main/ets/test/GetabilityInfo.test.ets | 8 +- .../test/getAllApplicationInfoJsunit.test.ets | 25 ++++--- .../test/getApplicationInfoJsunit.test.ets | 30 +++++--- .../src/main/js/test/ExampleJsunit.test.js | 74 +++++++++---------- 5 files changed, 79 insertions(+), 64 deletions(-) diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets index 788835618..44d54b216 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets @@ -239,10 +239,12 @@ export default function actsBmsJsUnPermissionTest() { expect(info.label).assertEqual("$string:entry_MainAbility"); expect(info.labelId > 0).assertTrue(); expect(info.systemApp).assertEqual(false); - expect(info.entryDir).assertEqual(""); + expect(info.entryDir).assertEqual( + "/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); expect(info.supportedModes).assertEqual(0); expect(info.process).assertEqual("com.example.actsbmsetsunpermissiontest"); - expect(info.moduleSourceDirs.length).assertEqual(0); + expect(info.moduleSourceDirs[0]).assertEqual( + "/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); expect(info.enabled).assertEqual(true); expect(info.uid).assertLarger(0); expect(info.entityType).assertEqual("unspecified"); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets index 405303d1f..e7e0bc85a 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets @@ -264,13 +264,13 @@ export default function GetabilityInfo() { expect(info.labelId > 0).assertTrue(); expect(info.systemApp).assertEqual(false); expect(typeof (info.entryDir)).assertEqual("string"); - expect(info.entryDir).assertEqual(""); + expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); expect(typeof (info.supportedModes)).assertEqual("number"); expect(info.supportedModes).assertEqual(0); expect(typeof (info.process)).assertEqual("string"); expect(info.process).assertEqual("com.open.harmony.packagemag"); expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); - expect(info.moduleSourceDirs.length).assertEqual(0); + expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); expect(Array.isArray(info.permissions)).assertEqual(true); } @@ -314,10 +314,10 @@ export default function GetabilityInfo() { expect(info.label).assertEqual("$string:app_name"); expect(info.labelId > 0).assertTrue(); expect(info.systemApp).assertEqual(false); - expect(info.entryDir).assertEqual(""); + expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry"); expect(info.supportedModes).assertEqual(0); expect(info.process).assertEqual("com.example.third1"); - expect(info.moduleSourceDirs.length).assertEqual(0); + expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry"); expect(JSON.stringify(info.metaData)).assertEqual("{}"); expect(info.enabled).assertEqual(true); expect(info.uid).assertLarger(0); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets index a72f4fd87..f9bd49785 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets @@ -375,13 +375,16 @@ export default function getAllApplicationBundleTest() { expect(data[i].systemApp).assertEqual(false); expect(data[i].supportedModes).assertEqual(0); expect(data[i].process).assertEqual('com.open.harmony.packagemag'); - expect(data[i].entryDir).assertEqual(''); + expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + + '/com.open.harmony.packagemag'); expect(data[i].enabled).assertEqual(true); expect(data[i].entityType).assertEqual('unspecified'); expect(data[i].removable).assertEqual(true); expect(data[i].moduleInfos[0].moduleName).assertEqual('entry'); - expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual(''); - expect(data[i].moduleSourceDirs.length).assertEqual(0); + expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + expect(data[i].moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); } } } @@ -399,12 +402,14 @@ export default function getAllApplicationBundleTest() { expect(data.systemApp).assertFalse(); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_OTHER); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.permissions.length).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleSourceDirs.length).assertEqual(1); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(data.enabled).assertTrue(); expect(data.uid).assertLarger(0); @@ -426,12 +431,14 @@ export default function getAllApplicationBundleTest() { expect(data.systemApp).assertFalse(); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_OTHER); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.permissions.length).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleSourceDirs.length).assertEqual(1); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.enabled).assertTrue(); expect(data.uid).assertLarger(0); expect(data.entityType).assertEqual('unspecified'); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets index c9b0aeca5..108a1e2bd 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets @@ -446,13 +446,13 @@ export default function applicationBundleJsunit() { expect(data.systemApp).assertEqual(false); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_NAME); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME); expect(data.enabled).assertEqual(true); expect(data.entityType).assertEqual('unspecified'); expect(data.removable).assertEqual(true); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME); expect(data.permissions[0]).assertEqual("ohos.permission.GET_BUNDLE_INFO"); expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"); expect(data.permissions[2]).assertEqual("ohos.permission.USE_BLUETOOTH"); @@ -472,12 +472,14 @@ export default function applicationBundleJsunit() { expect(data.systemApp).assertFalse(); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_NAME); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME); expect(data.permissions.length).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleSourceDirs.length).assertEqual(1); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME); expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + + BUNDLE_NAME + '/' + BUNDLE_NAME); expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(data.enabled).assertTrue(); expect(data.uid).assertLarger(0); @@ -501,12 +503,14 @@ export default function applicationBundleJsunit() { expect(data.systemApp).assertFalse(); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_OTHER); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.permissions.length).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleSourceDirs.length).assertEqual(1); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(data.enabled).assertTrue(); expect(data.uid).assertLarger(0); @@ -528,12 +532,14 @@ export default function applicationBundleJsunit() { expect(data.systemApp).assertFalse(); expect(data.supportedModes).assertEqual(0); expect(data.process).assertEqual(BUNDLE_OTHER); - expect(data.entryDir).assertEqual(''); + expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.permissions.length).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(0); + expect(data.moduleSourceDirs.length).assertEqual(1); + expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry'); expect(data.enabled).assertTrue(); expect(data.uid).assertLarger(0); expect(data.entityType).assertEqual('unspecified'); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js index 03078ef3a..14261daab 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js @@ -96,7 +96,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.entryInstallationFree).assertEqual(false); for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(datainfo.appInfo.enabled).assertEqual(true); done(); @@ -160,7 +160,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.entryInstallationFree).assertEqual(false); for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(datainfo.appInfo.enabled).assertEqual(true); } @@ -251,7 +251,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.appInfo.supportedModes).assertEqual(0); for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(datainfo.appInfo.enabled).assertEqual(true); done(); @@ -295,7 +295,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.appInfo.supportedModes).assertEqual(0); for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(datainfo.appInfo.enabled).assertEqual(true); done(); @@ -427,7 +427,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.appInfo.supportedModes).assertEqual(0); for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(datainfo.appInfo.enabled).assertEqual(true); done(); @@ -508,7 +508,7 @@ describe('ActsBundleManagerTest', function () { expect(dataInfo.entryInstallationFree).assertEqual(false); for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) { expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(dataInfo.appInfo.enabled).assertEqual(true); console.info("testGetBundleInfoCurrentUserIdPromise end --------"); @@ -557,7 +557,7 @@ describe('ActsBundleManagerTest', function () { expect(dataInfo.entryInstallationFree).assertEqual(false); for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) { expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } console.info("testGetBundleInfoCurrentUserIdCallback end --------"); done(); @@ -626,12 +626,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].supportedModes).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } @@ -648,12 +648,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.length).assertLarger(0); for (let i = 0; i < datainfo.length; i++) { expect(datainfo[i].name.length).assertLarger(0); - expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].supportedModes).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } done(); @@ -695,7 +695,7 @@ describe('ActsBundleManagerTest', function () { userId).then(datainfo => { expect(typeof datainfo).assertEqual(OBJECT); console.info("getApplicationInfo success:" + JSON.stringify(datainfo)); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); @@ -711,10 +711,10 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName"); expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue"); expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name"); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); for (let j = 0; j < datainfo.moduleInfos.length; j++) { expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } done(); }).catch(err => { @@ -741,7 +741,7 @@ describe('ActsBundleManagerTest', function () { } expect(typeof datainfo).assertEqual(OBJECT); console.info("testGetApplicationInfoMetaDataCallback success:" + JSON.stringify(datainfo)); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); @@ -757,10 +757,10 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName"); expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue"); expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name"); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); for (let j = 0; j < datainfo.moduleInfos.length; j++) { expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } done(); }) @@ -780,7 +780,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.description.length).assertLarger(0); expect(datainfo.icon.length).assertLarger(0); expect(datainfo.label.length).assertLarger(0); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.name).assertEqual(NAME2); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); @@ -793,12 +793,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.supportedModes).assertEqual(0); expect(datainfo.process).assertEqual(NAME2); expect(datainfo.enabled).assertEqual(true); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertEqual(2); expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature"); for (let j = 0; j < datainfo.moduleInfos.length; j++) { - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } done(); }) @@ -817,7 +817,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.description.length).assertLarger(0); expect(datainfo.icon.length).assertLarger(0); expect(datainfo.label.length).assertLarger(0); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.name).assertEqual(NAME2); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); @@ -830,12 +830,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.supportedModes).assertEqual(0); expect(datainfo.process).assertEqual(NAME2); expect(datainfo.enabled).assertEqual(true); - expect(datainfo.moduleSourceDirs.length).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertEqual(2); expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature"); for (let j = 0; j < datainfo.moduleInfos.length; j++) { - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } done(); }) @@ -1042,7 +1042,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.enabled).assertEqual(true); for (let j = 0; j < datainfo.moduleInfos.length; j++) { expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } done(); }).catch(error => { @@ -1080,7 +1080,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.enabled).assertEqual(true); for (let j = 0; j < datainfo.moduleInfos.length; j++) { expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } done(); }) @@ -1150,12 +1150,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].supportedModes).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } done(); @@ -1177,12 +1177,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].supportedModes).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } done(); @@ -1204,12 +1204,12 @@ describe('ActsBundleManagerTest', function () { expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].supportedModes).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } done(); @@ -1421,7 +1421,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.metaData.length).assertLarger(0); for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) { expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } } done(); @@ -1480,7 +1480,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.metaData.length).assertLarger(0); for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) { expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); - expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } } done(); @@ -1521,9 +1521,9 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.applicationInfo.supportedModes).assertEqual(0); expect(datainfo.applicationInfo.enabled).assertEqual(true); expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry"); - expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(DIR3); expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature"); - expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(DIR2); } done(); }) @@ -1562,9 +1562,9 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.applicationInfo.supportedModes).assertEqual(0); expect(datainfo.applicationInfo.enabled).assertEqual(true); expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry"); - expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(DIR3); expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature"); - expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(''); + expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(DIR2); } done(); }) -- GitLab