-
Here's my code: mock.idSpecifications = {
Id: {
generate: () => new ObjectId(),
stringify: (t: unknown) => (t as ObjectId).toString(),
},
}
await startServer(true, true);
console.log("mock server started"); And I get the error: Error: Id is generated from DB. For in-memory driver it's required to implement mock.idSpecifications.ID in order to generate the id Also, I'm curious, is mock like a singleton? Or do I have to create an instance of a mock whenever I want to use it? |
Beta Was this translation helpful? Give feedback.
Answered by
Atlinx
Jun 2, 2022
Replies: 1 comment
-
I had to change mock.idSpecifications = {
ID: {
generate: () => new ObjectId(),
stringify: (t: unknown) => (t as ObjectId).toString(),
},
}
await startServer(true, true);
console.log("mock server started"); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Atlinx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to change
Id
toID
. I didn't read the error message carefully 😅