提交 2f677203 编写于 作者: Y yanglifeng1217

<add assertion>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 78d71136
...@@ -79,6 +79,7 @@ describe('kvManagerCallbackTest', function () { ...@@ -79,6 +79,7 @@ describe('kvManagerCallbackTest', function () {
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100');
try { try {
await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) {
expect((err == undefined) && (store != null)).assertTrue();
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 getKVStore success'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 getKVStore success');
kvStore = store; kvStore = store;
done(); done();
...@@ -104,6 +105,7 @@ describe('kvManagerCallbackTest', function () { ...@@ -104,6 +105,7 @@ describe('kvManagerCallbackTest', function () {
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore success'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore success');
expect(null).assertFail(); expect(null).assertFail();
} else { } else {
expect((err != undefined)).assertTrue();
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore fail'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore fail');
} }
done(); done();
......
...@@ -82,6 +82,7 @@ describe('kvManagerCallbackTest', function () { ...@@ -82,6 +82,7 @@ describe('kvManagerCallbackTest', function () {
console.info('testKVManagerGetKVStore101'); console.info('testKVManagerGetKVStore101');
try { try {
await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) {
expect((err == undefined) && (store != null)).assertTrue();
console.info('testKVManagerGetKVStore101 getKVStore success'); console.info('testKVManagerGetKVStore101 getKVStore success');
kvStore = store; kvStore = store;
done(); done();
...@@ -106,6 +107,7 @@ describe('kvManagerCallbackTest', function () { ...@@ -106,6 +107,7 @@ describe('kvManagerCallbackTest', function () {
console.info('testKVManagerGetKVStore102 getKVStore success'); console.info('testKVManagerGetKVStore102 getKVStore success');
expect(null).assertFail(); expect(null).assertFail();
} else { } else {
expect((err != undefined)).assertTrue();
console.info('testKVManagerGetKVStore102 getKVStore fail'); console.info('testKVManagerGetKVStore102 getKVStore fail');
} }
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册