diff --git a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/KvStoreResultSetJsunit.test.js b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/KvStoreResultSetJsunit.test.js index b7b863c25ee0e5615a5f8b4b2b2f3227ae6e787b..38e887c3136171d3dd1faa43866669f7a181f256 100644 --- a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/KvStoreResultSetJsunit.test.js +++ b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/KvStoreResultSetJsunit.test.js @@ -13,7 +13,7 @@ * limitations under the License. */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -import factory from '@ohos.data.distributedData' +import factory from '@ohos.data.distributedData'; const TEST_BUNDLE_NAME = 'ohos.acts.distributeddatamgr'; const TEST_STORE_ID = 'storeId'; @@ -35,6 +35,7 @@ describe('KvStoreResultSetTest', function() { encrypt : false, backup : false, autoSync : true, + kvStoreType : factory.KVStoreType.SINGLE_VERSION, schema : '', securityLevel : factory.SecurityLevel.S2, diff --git a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SchemaJsunit.test.js b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SchemaJsunit.test.js index af901a6f16c870cbb634b4460ac006aecfc48450..39e46f65c914e67c125d72407a76c255cabcfccb 100644 --- a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SchemaJsunit.test.js +++ b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SchemaJsunit.test.js @@ -275,11 +275,11 @@ describe('SchemaTest', function() { let schema = new ddm.Schema(); schema.root.appendChild(english); - schema.indexes = []; // indexex set to empty array. - console.log("schema: " + schema.toJsonString()); - } catch (e) { - console.log("schema fail on exception: " + e); + console.log("schema without indexes: " + schema.toJsonString()); + schema.indexes = []; // indexex set to empty array -> invalid indexes. expect(null).assertFail(); + } catch (e) { + console.log("schema exception is ok: " + e); } done(); }) diff --git a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SingleKvStoreCallbackJsunit.test.js b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SingleKvStoreCallbackJsunit.test.js index 9f428a3dfa5f37b4951d891c6f8cfc033cc05092..cd9550b0f4de8b5b61875cc368a7221c59cfe40d 100755 --- a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SingleKvStoreCallbackJsunit.test.js +++ b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/SingleKvStoreCallbackJsunit.test.js @@ -832,8 +832,8 @@ describe('SingleKvStoreCallbackTest', function () { }catch(e) { console.log('testSingleKvStoreOnSyncComplete101 e' + e); expect(null).assertFail(); - done(); } + done(); }) /**