This fixes a couple different issues I ran into while adding tests for one of my apps:
api.foo.bar.default wasn't supported (because the path is api.foo.bar and splitting on : doesn't quite work)
db.patch(doc._id, { _id: doc._id, _creationTime: doc._creationTime, somethingElse: "foo" }) would error (which is inconsistent with how it works in prod)
I added support for db.normalizeId using our fake ID format
Also as a drive-by change, I used reverse instead of toReversed because the latter is only available in Node 20 (which I personally haven't installed yet) just so npm run test comes up green.
This fixes a couple different issues I ran into while adding tests for one of my apps:
api.foo.bar.default
wasn't supported (because the path isapi.foo.bar
and splitting on:
doesn't quite work)db.patch(doc._id, { _id: doc._id, _creationTime: doc._creationTime, somethingElse: "foo" })
would error (which is inconsistent with how it works in prod)db.normalizeId
using our fake ID formatAlso as a drive-by change, I used
reverse
instead oftoReversed
because the latter is only available in Node 20 (which I personally haven't installed yet) just sonpm run test
comes up green.