mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 20:21:46 +00:00
Add test for bulkDocs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user