DEV Community

loading...

Discussion on: Testing Node.js + Mongoose with an in-memory database

Collapse
gmarokov profile image
Georgi Marokov • Edited

I get this error when using .deleteMany with TS:
Expected 1-3 arguments, but got 0.ts(2554)
index.d.ts(945, 16): An argument for 'filter' was not provided.

So I called it with empty obj: await collection.deleteMany({});