Hi Bill, great article.
Question, how would you make your shopping cart object support the observer pattern with EventEmitter? This is where the class syntax with extends shines, although I’m interested in your reply.
This seems redundant.
If you call the MongoDB connect method prior to Express.js
app.listen() then you can just use the promises returned from the Node.js MongoDB driver. I’m sure the driver supported Promises back in mid 2018.
Thanks Piotr Jakubowski.
I was excited once I got it all working and wanted to put the effort into the article to share the details.
After using this testing method heavily for the last few weeks, it is truly liberating to ignore the front end whilst building new API endpoints. The amount of code I…
Hi Mr. Leo,
I’m glad you liked the article.
It looks like you can’t with Postgres however there are other options as discussed in this StackOverflow post.
MySQL has some options as discussed in an article by Neil Bartley titled MySQL in memory for faster testing. There are…
I would like to add a different approach. Activity-Based Authorization as documented by @derickbailey in his article: https://lostechies.com/derickbailey/2011/05/24/dont-do-role-based-authorization-checks-do-activity-based-checks/