提交 51f91ef3 编写于 作者: L liangzhenyu123

<liangzhenyu6@huawei.com>

Signed-off-by: Nliangzhenyu123 <liangzhenyu6@huawei.com>
上级 0930d7e3
......@@ -169,5 +169,31 @@ describe('rdbstoreInsertTest', function () {
done()
console.info(TAG + "************* testRdbStoreInsert0003 end *************");
})
/**
* @tc.name rdb insert test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_Insert_0040
* @tc.desc rdb insert test
*/
it('testRdbStoreInsert0004', 0, async function (done) {
console.log(TAG + "************* testRdbStoreInsert0004 start *************");
var u8 = new Uint8Array([1, 2, 3])
const valueBucket = {
"name": "zhangsan",
"age": 18,
"salary": null,
"blobType": u8,
}
let insertPromise = rdbStore.insert("test", valueBucket)
insertPromise.then(async (ret) => {
expect(1).assertEqual(ret)
console.log(TAG + "insert first done: " + ret)
}).catch((err) => {
console.log(TAG + "insert with null table")
expect(null).assertFail()
})
done();
console.log(TAG + "************* testRdbStoreInsert0004 end *************");
})
console.info(TAG + "*************Unit Test End*************");
})}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册