diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js index 66d4db197f479d2a7a1068926dcc113e68cf799a..ed32450ff2d34d010cf6f7f2a6adb3b76df3b3cb 100644 --- a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js +++ b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js @@ -1801,7 +1801,7 @@ describe('deviceKvStoreCallbackTest', function () { await kvStore.removeDeviceData('', function (err,data) { if (err == undefined) { console.info('testDeviceKvStoreRemoveDeviceData103 removeDeviceData success'); - expect(null).assertFail(); + expect(err == undefined).assertTrue(); } else { console.info('testDeviceKvStoreRemoveDeviceData103 removeDeviceData fail'); } diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js index dccb08d871cd5561a7f2151f09dbc8e8a4af596c..239aa54f7f449d8b3d9c25efdb77913f8adc3e40 100644 --- a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js +++ b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js @@ -1990,11 +1990,11 @@ describe('deviceKvStorePromiseTest', function () { it('testDeviceKvStoreRemoveDeviceData003', 0, async function (done) { console.info('testDeviceKvStoreRemoveDeviceData003'); try { - await kvStore.removeDeviceData('').then((err) => { + await kvStore.removeDeviceData('').then(() => { console.info('testDeviceKvStoreRemoveDeviceData003 removeDeviceData success'); - expect(null).assertFail(); }).catch((err) => { console.info('testDeviceKvStoreRemoveDeviceData003 removeDeviceData fail ' + err); + expect(null).assertFail(); }); }catch(e) { console.info('testDeviceKvStoreRemoveDeviceData003 e ' + e); diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js index 792701fc1f32562714dc18aaa0578fe5c9082363..3001a4268c736cd5b867edce5a88d5e61c5365e0 100644 --- a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js +++ b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js @@ -1760,7 +1760,7 @@ describe('singleKvStoreCallbackTest', function () { await kvStore.removeDeviceData('', function (err,data) { if (err == undefined) { console.info('testSingleKvStoreRemoveDeviceData103 removeDeviceData success'); - expect(null).assertFail(); + expect(err == undefined).assertTrue(); } else { console.info('testSingleKvStoreRemoveDeviceData103 removeDeviceData fail'); } diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js index 15bcefc7a0b18d1025f84605235e53e981938718..9e4f302e98aea814775be4b3994d978aa1e9a5a4 100644 --- a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js +++ b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js @@ -1959,11 +1959,11 @@ describe('singleKvStorePromiseTest', function () { it('testSingleKvStoreRemoveDeviceData003', 0, async function (done) { console.info('testSingleKvStoreRemoveDeviceData003'); try { - await kvStore.removeDeviceData('').then((err) => { + await kvStore.removeDeviceData('').then(() => { console.info('testSingleKvStoreRemoveDeviceData003 removeDeviceData success'); - expect(null).assertFail(); }).catch((err) => { console.info('testSingleKvStoreRemoveDeviceData003 removeDeviceData fail ' + err); + expect(null).assertFail(); }); }catch(e) { console.info('testSingleKvStoreRemoveDeviceData003 e ' + e);