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

!7345 【distributeddatamgr】【monthly_20221018】SingleKvStoreKVCallbackJsTest.js用例修改

Merge pull request !7345 from wuxiaodan/monthly_20221018
......@@ -177,9 +177,10 @@ describe('SingleKvStoreCallbackTest', function () {
await kvStore.get(KEY_TEST_STRING_ELEMENT, function (err,data) {
if (err == undefined) {
console.info('SingleKvStoreGetStringCallbackTest001 get success');
expect(true).assertTrue();
expect(null).assertFail();
} else {
console.info('SingleKvStoreGetStringCallbackTest001 get fail');
console.error('SingleKvStoreGetStringCallbackTest001 get fail' + `, error code is ${err.code}, message is ${err.message}`);
expect(err.code == 15100004).assertTrue();
}
done();
});
......@@ -355,9 +356,10 @@ describe('SingleKvStoreCallbackTest', function () {
await kvStore.get(KEY_TEST_INT_ELEMENT, function (err,data) {
if (err == undefined) {
console.info('SingleKvStoreGetIntCallbackTest002 get success');
expect(true).assertTrue();
expect(null).assertFail();
} else {
console.info('SingleKvStoreGetIntCallbackTest002 get fail');
console.error('SingleKvStoreGetIntCallbackTest002 get fail' + `, error code is ${err.code}, message is ${err.message}`);
expect(err.code == 15100004).assertTrue();
}
done();
})
......@@ -401,9 +403,10 @@ describe('SingleKvStoreCallbackTest', function () {
await kvStore.get(KEY_TEST_BOOLEAN_ELEMENT, function (err,data) {
if (err == undefined) {
console.info('SingleKvStoreGetBoolCallbackTest001 get success');
expect(true).assertTrue();
expect(null).assertFail();
} else {
console.error('SingleKvStoreGetBoolCallbackTest001 get fail' + `, error code is ${err.code}, message is ${err.message}`);
expect(err.code == 15100004).assertTrue();
}
done();
});
......@@ -553,9 +556,10 @@ describe('SingleKvStoreCallbackTest', function () {
await kvStore.get(KEY_TEST_FLOAT_ELEMENT, function (err,data) {
if (err == undefined) {
console.info('SingleKvStoreGetFloatCallbackTest001 get success');
expect(true).assertTrue();
expect(null).assertFail();
} else {
console.error('SingleKvStoreGetFloatCallbackTest001 get fail' + `, error code is ${err.code}, message is ${err.message}`);
expect(err.code == 15100004).assertTrue();
}
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册