mock-db
I released a cool little tool today!
I’m currently performing a complete Typescript refactor of my Entity Manager project. This package rationalizes data modeling & query in NoSQL database environments, and it is SUPER important to me because it’s a core dependency for the entire VeteranCrowd back end.
There’s a whole list of lessons learned to incorporate, as you could imagine after two years of operating against 16 (and counting) back-end services. So plenty of work to do there.
Entity Manager works on a provider model. I’m using it against DynamoDB, but it would work against any “sufficiently similar” NoSQL database.
I found myself wanting badly to improve Entity Manager’s test suite, and it occurred to me: what I REALLY need is a way to mock DynamoDB’s query & scan behavior with local JSON data.
So I built it!
So far mock-db
just replicates DynamoDB’s scan & query behaviors, which satisfies my immediate needs. Note that I am NOT replicating the DynamoDB API or query language… just generic interfaces like hash, sort, and page keys, which is plenty if you’re building a platform-agnostic tool like Entity Manager.
I’ll add more capabilities as required. If you try the library and like it or would like to see more features, let me know!
Meanwhile, see the repo for lots more details.
Leave a comment