Add test for bulkDocs

This commit is contained in:
Nao Ohira
2016-09-19 21:29:07 +02:00
parent 0fa2d35931
commit a1610b0485
+17
View File
@@ -38,6 +38,23 @@ namespace PouchDBCoreTests {
});
}
function testBulkDocs() {
const db = new PouchDB<MyModel>();
type MyModel = { property: 'someProperty '};
let model: PouchDB.Core.Document<MyModel>;
let model2: PouchDB.Core.Document<MyModel>;
db.bulkDocs([model, model2]).then((result) => {
result.forEach(({ ok, id, rev }) => {
isString(id);
isString(rev);
});
});
db.bulkDocs([model, model2], null, (error, response) => {
});
}
function testCompact() {
const db = new PouchDB<{}>();
// Promise version