Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ test('create - missing arguments - throws', async () => {
await fs.rm(testDir, { recursive: true }).catch(() => {});
const db = await createDoubleDb(testDir);

try {
await db.insert();
} catch (error) {
await db.close();
assert.strictEqual((error as Error).message, 'doubledb.insert: no document was supplied to insert function');
}
await assert.rejects(
db.insert(),
/doubledb.insert: no document was supplied to insert function/
);

await db.close();
});

test('replace - missing id argument - throws', async () => {
Expand Down