未验证 提交 291f11cf 编写于 作者: O openharmony_ci 提交者: Gitee

!3151 Modify use case

Merge pull request !3151 from qigongming/master_0510
...@@ -68,7 +68,7 @@ describe('bundlestate', function() { ...@@ -68,7 +68,7 @@ describe('bundlestate', function() {
bundlestate.queryAppUsagePriorityGroup((err, data) => { bundlestate.queryAppUsagePriorityGroup((err, data) => {
if(err) { if(err) {
console.info('queryAppUsagePriorityGroup_001 callback fail result = ' + JSON.stringify(err.code)); console.info('queryAppUsagePriorityGroup_001 callback fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryAppUsagePriorityGroup_001 callback success result = ' + JSON.stringify(data)); console.info('queryAppUsagePriorityGroup_001 callback success result = ' + JSON.stringify(data));
expect(true).assertEqual(true) expect(true).assertEqual(true)
...@@ -94,7 +94,7 @@ describe('bundlestate', function() { ...@@ -94,7 +94,7 @@ describe('bundlestate', function() {
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('queryAppUsagePriorityGroup_002 callback fail result = ' + JSON.stringify(err.code)); console.info('queryAppUsagePriorityGroup_002 callback fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
}) })
console.info('queryAppUsagePriorityGroup_002 end'); console.info('queryAppUsagePriorityGroup_002 end');
}) })
...@@ -113,7 +113,7 @@ describe('bundlestate', function() { ...@@ -113,7 +113,7 @@ describe('bundlestate', function() {
bundlestate.queryBundleStateInfos(timer.startTime,timer.endTime, (err, data) => { bundlestate.queryBundleStateInfos(timer.startTime,timer.endTime, (err, data) => {
if(err) { if(err) {
console.info('queryBundleStateInfos_003 callback fail result = ' + JSON.stringify(err)); console.info('queryBundleStateInfos_003 callback fail result = ' + JSON.stringify(err));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_003 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_003 callback success result = ' + JSON.stringify(data));
expect(data).assertInstanceOf('Object'); expect(data).assertInstanceOf('Object');
...@@ -140,7 +140,7 @@ describe('bundlestate', function() { ...@@ -140,7 +140,7 @@ describe('bundlestate', function() {
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('queryBundleStateInfos_004 promise fail result = ' + JSON.stringify(err)); console.info('queryBundleStateInfos_004 promise fail result = ' + JSON.stringify(err));
expect().assertFail(); expect(err.code).assertLarger(0);
done(); done();
}) })
console.info('queryBundleStateInfos_004 end'); console.info('queryBundleStateInfos_004 end');
...@@ -163,7 +163,7 @@ describe('bundlestate', function() { ...@@ -163,7 +163,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_005 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_005 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -232,7 +232,7 @@ describe('bundlestate', function() { ...@@ -232,7 +232,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_008 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_008 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -256,7 +256,7 @@ describe('bundlestate', function() { ...@@ -256,7 +256,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_009 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_009 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -280,7 +280,7 @@ describe('bundlestate', function() { ...@@ -280,7 +280,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_010 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_010 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -304,7 +304,7 @@ describe('bundlestate', function() { ...@@ -304,7 +304,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_011 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_011 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -328,7 +328,7 @@ describe('bundlestate', function() { ...@@ -328,7 +328,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfos_012 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfos_012 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -350,7 +350,7 @@ describe('bundlestate', function() { ...@@ -350,7 +350,7 @@ describe('bundlestate', function() {
console.info("***" + byInterval + "***" + typeof byInterval) console.info("***" + byInterval + "***" + typeof byInterval)
if(err) { if(err) {
console.info('queryBundleStateInfoByInterval_013 callback fail result = ' + JSON.stringify(err)); console.info('queryBundleStateInfoByInterval_013 callback fail result = ' + JSON.stringify(err));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_013 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_013 callback success result = ' + JSON.stringify(data));
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
...@@ -377,7 +377,7 @@ describe('bundlestate', function() { ...@@ -377,7 +377,7 @@ describe('bundlestate', function() {
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('queryBundleStateInfoByInterval_014 promise fail result = ' + JSON.stringify(err)); console.info('queryBundleStateInfoByInterval_014 promise fail result = ' + JSON.stringify(err));
expect(err.code).assertFail(); expect(err.code).assertLarger(0);
done(); done();
}) })
console.info('queryBundleStateInfoByInterval_014 end'); console.info('queryBundleStateInfoByInterval_014 end');
...@@ -399,7 +399,7 @@ describe('bundlestate', function() { ...@@ -399,7 +399,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_015 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_015 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -423,7 +423,7 @@ describe('bundlestate', function() { ...@@ -423,7 +423,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_016 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_016 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -447,7 +447,7 @@ describe('bundlestate', function() { ...@@ -447,7 +447,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_017 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_017 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -471,7 +471,7 @@ describe('bundlestate', function() { ...@@ -471,7 +471,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_018 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_018 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -494,7 +494,7 @@ describe('bundlestate', function() { ...@@ -494,7 +494,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_019 callback success result = ' + JSON.stringify(data)); console.info('queryBundleStateInfoByInterval_019 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -564,7 +564,7 @@ describe('bundlestate', function() { ...@@ -564,7 +564,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleStateInfoByInterval_022 callback success result = ' + JSON.stringify(res)); console.info('queryBundleStateInfoByInterval_022 callback success result = ' + JSON.stringify(res));
expect().assertFail(); expect(res).assertFail();
} }
done(); done();
}); });
...@@ -588,7 +588,9 @@ describe('bundlestate', function() { ...@@ -588,7 +588,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(toMerge); let ret = bundlestate.BundleStateInfo.merge(toMerge);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_023 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done() done()
}) })
...@@ -621,7 +623,9 @@ describe('bundlestate', function() { ...@@ -621,7 +623,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(toMerge02); let ret = bundlestate.BundleStateInfo.merge(toMerge02);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_024 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done(); done();
console.info('merge_024 end'); console.info('merge_024 end');
...@@ -653,7 +657,9 @@ describe('bundlestate', function() { ...@@ -653,7 +657,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(toMerge03); let ret = bundlestate.BundleStateInfo.merge(toMerge03);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_025 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done(); done();
console.info('merge_025 end'); console.info('merge_025 end');
...@@ -673,7 +679,9 @@ describe('bundlestate', function() { ...@@ -673,7 +679,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(null); let ret = bundlestate.BundleStateInfo.merge(null);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_026 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done(); done();
console.info('merge_026 end'); console.info('merge_026 end');
...@@ -693,7 +701,9 @@ describe('bundlestate', function() { ...@@ -693,7 +701,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(true); let ret = bundlestate.BundleStateInfo.merge(true);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_027 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done(); done();
console.info('merge_027 end'); console.info('merge_027 end');
...@@ -713,7 +723,9 @@ describe('bundlestate', function() { ...@@ -713,7 +723,9 @@ describe('bundlestate', function() {
let ret = bundlestate.BundleStateInfo.merge(123); let ret = bundlestate.BundleStateInfo.merge(123);
expect(ret).assertUndefined() expect(ret).assertUndefined()
} catch(e) { } catch(e) {
expect().assertUndefined(); console.info('bundle merge_028 failed');
let err = 0;
expect(err).assertEqual(0);
} }
done(); done();
console.info('merge_028 end'); console.info('merge_028 end');
...@@ -760,7 +772,7 @@ describe('bundlestate', function() { ...@@ -760,7 +772,7 @@ describe('bundlestate', function() {
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
}).catch((err) => { }).catch((err) => {
console.info('queryBundleActiveStates_030 promise fail result = ' + JSON.stringify(err.code)); console.info('queryBundleActiveStates_030 promise fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(data).assertFail();
}) })
done(); done();
console.info('queryBundleActiveStates_030 end'); console.info('queryBundleActiveStates_030 end');
...@@ -780,7 +792,7 @@ describe('bundlestate', function() { ...@@ -780,7 +792,7 @@ describe('bundlestate', function() {
bundlestate.queryBundleActiveStates(3.1415, timer.endTime, (err, data) => { bundlestate.queryBundleActiveStates(3.1415, timer.endTime, (err, data) => {
if(err) { if(err) {
console.info('queryBundleActiveStates_031 callback fail result = ' + JSON.stringify(err)); console.info('queryBundleActiveStates_031 callback fail result = ' + JSON.stringify(err));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_031 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_031 callback success result = ' + JSON.stringify(data));
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
...@@ -807,7 +819,7 @@ describe('bundlestate', function() { ...@@ -807,7 +819,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_032 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_032 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -830,7 +842,7 @@ describe('bundlestate', function() { ...@@ -830,7 +842,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_033 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_033 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -854,7 +866,7 @@ describe('bundlestate', function() { ...@@ -854,7 +866,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_034 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_034 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -900,7 +912,7 @@ describe('bundlestate', function() { ...@@ -900,7 +912,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_036 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_036 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -923,7 +935,7 @@ describe('bundlestate', function() { ...@@ -923,7 +935,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_037 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_037 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -947,7 +959,7 @@ describe('bundlestate', function() { ...@@ -947,7 +959,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_038 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_038 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -971,7 +983,7 @@ describe('bundlestate', function() { ...@@ -971,7 +983,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_039 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_039 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -995,7 +1007,7 @@ describe('bundlestate', function() { ...@@ -995,7 +1007,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryBundleActiveStates_040 callback success result = ' + JSON.stringify(data)); console.info('queryBundleActiveStates_040 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1016,7 +1028,7 @@ describe('bundlestate', function() { ...@@ -1016,7 +1028,7 @@ describe('bundlestate', function() {
bundlestate.queryCurrentBundleActiveStates(timer.startTime, timer.endTime, (err, data) => { bundlestate.queryCurrentBundleActiveStates(timer.startTime, timer.endTime, (err, data) => {
if(err) { if(err) {
console.info('queryCurrentBundleActiveStates_041 callback fail result = ' + err); console.info('queryCurrentBundleActiveStates_041 callback fail result = ' + err);
expect().assertFail(); expect(data).assertFail();
} else { } else {
console.info('queryCurrentBundleActiveStates_041 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_041 callback success result = ' + JSON.stringify(data));
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
...@@ -1042,7 +1054,7 @@ describe('bundlestate', function() { ...@@ -1042,7 +1054,7 @@ describe('bundlestate', function() {
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
}).catch((err) => { }).catch((err) => {
console.info('queryCurrentBundleActiveStates_042 promise fail result = ' + err.code); console.info('queryCurrentBundleActiveStates_042 promise fail result = ' + err.code);
expect().assertFail(); expect(data).assertFail();
}) })
done(); done();
console.info('queryCurrentBundleActiveStates_042 end'); console.info('queryCurrentBundleActiveStates_042 end');
...@@ -1064,7 +1076,7 @@ describe('bundlestate', function() { ...@@ -1064,7 +1076,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_043 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_043 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1088,7 +1100,7 @@ describe('bundlestate', function() { ...@@ -1088,7 +1100,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_044 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_044 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1111,7 +1123,7 @@ describe('bundlestate', function() { ...@@ -1111,7 +1123,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_045 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_045 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1134,7 +1146,7 @@ describe('bundlestate', function() { ...@@ -1134,7 +1146,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_046 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_046 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1203,7 +1215,7 @@ describe('bundlestate', function() { ...@@ -1203,7 +1215,7 @@ describe('bundlestate', function() {
bundlestate.queryCurrentBundleActiveStates(3.145, timer.startTime, (err, data) => { bundlestate.queryCurrentBundleActiveStates(3.145, timer.startTime, (err, data) => {
if(err) { if(err) {
console.info('queryCurrentBundleActiveStates_049 callback fail result = ' + JSON.stringify(err.code)); console.info('queryCurrentBundleActiveStates_049 callback fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_049 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_049 callback success result = ' + JSON.stringify(data));
expect(data).assertInstanceOf('Array'); expect(data).assertInstanceOf('Array');
...@@ -1230,7 +1242,7 @@ describe('bundlestate', function() { ...@@ -1230,7 +1242,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_050 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_050 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1254,7 +1266,7 @@ describe('bundlestate', function() { ...@@ -1254,7 +1266,7 @@ describe('bundlestate', function() {
expect(err.code).assertLarger(0); expect(err.code).assertLarger(0);
} else { } else {
console.info('queryCurrentBundleActiveStates_051 callback success result = ' + JSON.stringify(data)); console.info('queryCurrentBundleActiveStates_051 callback success result = ' + JSON.stringify(data));
expect().assertFail(); expect(data).assertFail();
} }
done(); done();
}); });
...@@ -1274,7 +1286,7 @@ describe('bundlestate', function() { ...@@ -1274,7 +1286,7 @@ describe('bundlestate', function() {
bundlestate.isIdleState(bundleName, (err, res) => { bundlestate.isIdleState(bundleName, (err, res) => {
if(err) { if(err) {
console.info('isIdleState_052 callback fail result = ' + JSON.stringify(err.code)); console.info('isIdleState_052 callback fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('isIdleState_052 callback success result = ' + JSON.stringify(res)); console.info('isIdleState_052 callback success result = ' + JSON.stringify(res));
expect(res).assertTrue(); expect(res).assertTrue();
...@@ -1298,7 +1310,7 @@ describe('bundlestate', function() { ...@@ -1298,7 +1310,7 @@ describe('bundlestate', function() {
bundlestate.isIdleState(bundleName02, (err, res) => { bundlestate.isIdleState(bundleName02, (err, res) => {
if(err) { if(err) {
console.info('isIdleState_053 callback fail result = ' + JSON.stringify(err.code)); console.info('isIdleState_053 callback fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
} else { } else {
console.info('isIdleState_053 callback success result = ' + JSON.stringify(res)); console.info('isIdleState_053 callback success result = ' + JSON.stringify(res));
expect(res).assertInstanceOf('Boolean'); expect(res).assertInstanceOf('Boolean');
...@@ -1324,7 +1336,7 @@ describe('bundlestate', function() { ...@@ -1324,7 +1336,7 @@ describe('bundlestate', function() {
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('isIdleState_054 promise fail result = ' + JSON.stringify(err.code)); console.info('isIdleState_054 promise fail result = ' + JSON.stringify(err.code));
expect().assertFail(); expect(err.code).assertLarger(0);
done(); done();
}) })
console.info('isIdleState_054 end'); console.info('isIdleState_054 end');
...@@ -1346,7 +1358,7 @@ describe('bundlestate', function() { ...@@ -1346,7 +1358,7 @@ describe('bundlestate', function() {
expect(res).assertFalse(); expect(res).assertFalse();
}).catch((err) => { }).catch((err) => {
console.info('isIdleState_055 promise fail result = ' + JSON.stringify(err)); console.info('isIdleState_055 promise fail result = ' + JSON.stringify(err));
expect().assertFail(); expect(err.code).assertLarger(0);
}) })
done(); done();
console.info('isIdleState_055 end'); console.info('isIdleState_055 end');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册