fix: handle queries for non-existent items
This commit is contained in:
parent
57bc0f18a0
commit
b3248ae431
3 changed files with 12 additions and 1 deletions
|
|
@ -155,6 +155,11 @@ Deno.test({
|
|||
asserts.assertEquals(found, random_item);
|
||||
}
|
||||
|
||||
const fetched_nonexistent_entries: ITEM[] = (await item_collection.find({ custom_organizing_test: '*&^' })).map((entry) =>
|
||||
entry.load()
|
||||
);
|
||||
asserts.assertEquals(fetched_nonexistent_entries.length, 0);
|
||||
|
||||
// leave one item behind so the whole db for this test doesn't get cleaned up so I can hand-review it
|
||||
// for (const item of items.slice(1)) {
|
||||
// await item_collection.delete(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue