node-mongodb-fixtures
node-mongodb-fixtures copied to clipboard
Invalid document id results in misleading error
Hey guys,
Ran into a confusing error today. I was accidentally trying to insert a document with an invalid ObjectId (1 character too short) and the error message I received as output was:
[error] no docs returned from file: "LendingFiles.ts". verify that a docs array was exported. note: if using .js files, use "module.exports", instead of "exports".
Took me a long time to pin down that there was a particular fixture that was failing the whole thing because of my bad ObjectId