fix(rustdb-storage): return empty collection list for missing databases
This commit is contained in:
@@ -50,6 +50,12 @@ tap.test('localsmartdb: should connect via returned connectionUri', async () =>
|
||||
expect(db).toBeTruthy();
|
||||
});
|
||||
|
||||
tap.test('localsmartdb: listCollections should be empty for missing database', async () => {
|
||||
const missingDb = client.db('missingdb');
|
||||
const collections = await missingDb.collections();
|
||||
expect(collections).toEqual([]);
|
||||
});
|
||||
|
||||
tap.test('localsmartdb: should reject double start', async () => {
|
||||
let threw = false;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user