未验证 提交 037cf764 编写于 作者: O openharmony_ci 提交者: Gitee

!3814 【resourceschedule_standard】【master分支】 XTS用例修改

Merge pull request !3814 from qigongming/master_0627
...@@ -60,7 +60,7 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -60,7 +60,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest001---------------------------'); console.info('----------------------DeviceUsageStatisticsJsTest001---------------------------');
let bundleName = 'com.explace.deviceUsageStatistics'; let bundleName = 'com.explace.deviceUsageStatistics';
bundleState.isIdleState(bundleName).then((res) => { bundleState.isIdleState(bundleName).then((res) => {
console.info('BUNDLE_ACTIVE isIdleState promise success.'); console.info('BUNDLE_ACTIVE isIdleStateone promise success.');
expect(true).assertEqual(true); expect(true).assertEqual(true);
}).catch((err) => { }).catch((err) => {
expect(false).assertEqual(true); expect(false).assertEqual(true);
...@@ -82,12 +82,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -82,12 +82,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest002---------------------------'); console.info('----------------------DeviceUsageStatisticsJsTest002---------------------------');
let bundleName = 'com.explace.deviceUsageStatistics'; let bundleName = 'com.explace.deviceUsageStatistics';
bundleState.isIdleState(bundleName, (err, res) => { bundleState.isIdleState(bundleName, (err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE isIdleState callback success.');
expect(true).assertEqual(true);
} else {
expect(false).assertEqual(true); expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE isIdleState callback failure.'); console.info('BUNDLE_ACTIVE isIdleState callback failure.');
} else {
console.info('BUNDLE_ACTIVE isIdleState callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -106,9 +106,9 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -106,9 +106,9 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest003---------------------------'); console.info('----------------------DeviceUsageStatisticsJsTest003---------------------------');
bundleState.queryAppUsagePriorityGroup().then( res => { bundleState.queryAppUsagePriorityGroup().then( res => {
console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise success.'); console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise success.');
expect(true).assertEqual(true) expect(true).assertEqual(true);
}).catch( err => { }).catch( err => {
expect(false).assertEqual(true) expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise failure.'); console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise failure.');
}); });
...@@ -126,12 +126,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -126,12 +126,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
it("DeviceUsageStatisticsJsTest004", 0, async function (done) { it("DeviceUsageStatisticsJsTest004", 0, async function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest004---------------------------'); console.info('----------------------DeviceUsageStatisticsJsTest004---------------------------');
bundleState.queryAppUsagePriorityGroup((err, res) => { bundleState.queryAppUsagePriorityGroup((err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback success.'); expect(false).assertEqual(true);
expect(true).assertEqual(true)
} else {
expect(false).assertEqual(true)
console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback failure.'); console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback failure.');
} else {
console.info('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -174,12 +174,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -174,12 +174,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 0; let beginTime = 0;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE queryBundleActiveStates callback success.');
expect(true).assertEqual(true);
} else {
expect(false).assertEqual(true); expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE queryBundleActiveStates callback failure.'); console.info('BUNDLE_ACTIVE queryBundleActiveStates callback failure.');
} else {
console.info('BUNDLE_ACTIVE queryBundleActiveStates callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -222,12 +222,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -222,12 +222,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 0; let beginTime = 0;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfos(beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfos(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE queryBundleStateInfos callback success.');
expect(true).assertEqual(true);
} else {
expect(false).assertEqual(true); expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE queryBundleStateInfos callback failure.'); console.info('BUNDLE_ACTIVE queryBundleStateInfos callback failure.');
} else {
console.info('BUNDLE_ACTIVE queryBundleStateInfos callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -270,12 +270,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -270,12 +270,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 0; let beginTime = 0;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE queryCurrentBundleActiveStates callback success.');
expect(true).assertEqual(true);
} else {
expect(false).assertEqual(true); expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE queryCurrentBundleActiveStates callback failure.'); console.info('BUNDLE_ACTIVE queryCurrentBundleActiveStates callback failure.');
} else {
console.info('BUNDLE_ACTIVE queryCurrentBundleActiveStates callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -320,12 +320,12 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -320,12 +320,12 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 0; let beginTime = 0;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
console.info('BUNDLE_ACTIVE queryBundleStateInfoByInterval callback success.');
expect(true).assertEqual(true);
} else {
expect(false).assertEqual(true); expect(false).assertEqual(true);
console.info('BUNDLE_ACTIVE queryBundleStateInfoByInterval callback failure.'); console.info('BUNDLE_ACTIVE queryBundleStateInfoByInterval callback failure.');
} else {
console.info('BUNDLE_ACTIVE queryBundleStateInfoByInterval callback success.');
expect(true).assertEqual(true);
} }
}); });
...@@ -411,14 +411,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -411,14 +411,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1000; let beginTime = 1000;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{id: 1}]; res = [{id: 1}];
} }
console.log('test BundleStateInfo id :' + res[0].id) console.log('test BundleStateInfo id :' + res[0].id);
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -439,14 +439,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -439,14 +439,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 100; let beginTime = 100;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{bundleName: 'www.explace.com'}]; res = [{bundleName: 'www.explace.com'}];
} }
console.log('test BundleStateInfo bundleName :' + res[0].bundleName) console.log('test BundleStateInfo bundleName :' + res[0].bundleName)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -467,14 +467,15 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -467,14 +467,15 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{infosEndTime: 0}]; res = [{infosEndTime: 0}];
} }
console.log('test BundleStateInfo infosEndTime :' + res[0].infosEndTime) console.log('test BundleStateInfo infosEndTime :' + res[0].infosEndTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -495,14 +496,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -495,14 +496,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{abilityPrevSeenTime: 0}]; res = [{abilityPrevSeenTime: 0}];
} }
console.log('test BundleStateInfo abilityPrevSeenTime :' + res[0].abilityPrevSeenTime) console.log('test BundleStateInfo abilityPrevSeenTime :' + res[0].abilityPrevSeenTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -523,14 +524,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -523,14 +524,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{abilitySeenTotalTime: 0}]; res = [{abilitySeenTotalTime: 0}];
} }
console.log('test BundleStateInfo abilitySeenTotalTime :' + res[0].abilitySeenTotalTime) console.log('test BundleStateInfo abilitySeenTotalTime :' + res[0].abilitySeenTotalTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -551,14 +552,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -551,14 +552,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{fgAbilityAccessTotalTime: 0}]; res = [{fgAbilityAccessTotalTime: 0}];
} }
console.log('test BundleStateInfo fgAbilityAccessTotalTime :' + res[0].fgAbilityAccessTotalTime) console.log('test BundleStateInfo fgAbilityAccessTotalTime :' + res[0].fgAbilityAccessTotalTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -579,14 +580,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -579,14 +580,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{fgAbilityPrevAccessTime: 0}]; res = [{fgAbilityPrevAccessTime: 0}];
} }
console.log('test BundleStateInfo fgAbilityPrevAccessTime :' + res[0].fgAbilityPrevAccessTime) console.log('test BundleStateInfo fgAbilityPrevAccessTime :' + res[0].fgAbilityPrevAccessTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -607,14 +608,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -607,14 +608,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{abilityPrevAccessTime: 0}]; res = [{abilityPrevAccessTime: 0}];
} }
console.log('test BundleStateInfo abilityPrevAccessTime :' + res[0].abilityPrevAccessTime) console.log('test BundleStateInfo abilityPrevAccessTime :' + res[0].abilityPrevAccessTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -635,14 +636,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -635,14 +636,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{infosBeginTime: 0}]; res = [{infosBeginTime: 0}];
} }
console.log('test BundleStateInfo infosBeginTime :' + res[0].infosBeginTime) console.log('test BundleStateInfo infosBeginTime :' + res[0].infosBeginTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -663,14 +664,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -663,14 +664,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(intervalType, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{abilityInFgTotalTime: 0}]; res = [{abilityInFgTotalTime: 0}];
} }
console.log('test BundleStateInfo abilityInFgTotalTime :' + res[0].abilityInFgTotalTime) console.log('test BundleStateInfo abilityInFgTotalTime :' + res[0].abilityInFgTotalTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -690,14 +691,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -690,14 +691,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{bundleName: 'www.baidu.com'}]; res = [{bundleName: 'www.baidu.com'}];
} }
console.log('test BundleActiveState bundleName :' + res[0].bundleName) console.log('test BundleActiveState bundleName :' + res[0].bundleName)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -717,14 +718,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -717,14 +718,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{stateType: 0}]; res = [{stateType: 0}];
} }
console.log('test BundleActiveState stateType :' + res[0].stateType) console.log('test BundleActiveState stateType :' + res[0].stateType)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -744,14 +745,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -744,14 +745,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{stateOccurredTime: 0}]; res = [{stateOccurredTime: 0}];
} }
console.log('test BundleActiveState stateOccurredTime :' + res[0].stateOccurredTime) console.log('test BundleActiveState stateOccurredTime :' + res[0].stateOccurredTime)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -771,14 +772,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -771,14 +772,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{appUsagePriorityGroup: 0}]; res = [{appUsagePriorityGroup: 0}];
} }
console.log('test BundleActiveState appUsagePriorityGroup :' + res[0].appUsagePriorityGroup) console.log('test BundleActiveState appUsagePriorityGroup :' + res[0].appUsagePriorityGroup)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -798,14 +799,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -798,14 +799,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{indexOfLink: 'id'}]; res = [{indexOfLink: 'id'}];
} }
console.log('test BundleActiveState indexOfLink :' + res[0].indexOfLink) console.log('test BundleActiveState indexOfLink :' + res[0].indexOfLink)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -825,14 +826,14 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -825,14 +826,14 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 10; let beginTime = 10;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => { bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
res = [{nameOfClass: 'BundleStates'}]; res = [{nameOfClass: 'BundleStates'}];
} }
console.log('test BundleActiveState nameOfClass :' + res[0].nameOfClass) console.log('test BundleActiveState nameOfClass :' + res[0].nameOfClass)
} else {
expect(false).assertEqual(true);
} }
}); });
...@@ -891,7 +892,9 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -891,7 +892,9 @@ describe("DeviceUsageStatisticsJsTest", function () {
let beginTime = 1001; let beginTime = 1001;
let endTime = 20000000000000; let endTime = 20000000000000;
bundleState.queryBundleStateInfoByInterval(0, beginTime, endTime, (err, res) => { bundleState.queryBundleStateInfoByInterval(0, beginTime, endTime, (err, res) => {
if(err.code === 0) { if(err) {
expect(false).assertEqual(true);
} else {
expect(true).assertEqual(true); expect(true).assertEqual(true);
if(res === undefined) { if(res === undefined) {
let bundleStateInfo = { let bundleStateInfo = {
...@@ -911,8 +914,6 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -911,8 +914,6 @@ describe("DeviceUsageStatisticsJsTest", function () {
} else { } else {
console.log('test bundleStateInfo merge') console.log('test bundleStateInfo merge')
} }
} else {
expect(false).assertEqual(true);
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册