Hacker Newsnew | past | comments | ask | show | jobs | submit | jokesterfr's commentslogin

We do both at work (~300k sloc, >70% unit test coverage).

There are unit tests with mocks on repository calls, and integration testing with a fresh pg database bootstraped with docker and .sql seeds.

One is fast to code, one gives more realistic feedbacks on real life execution. Both solve issues.

This is not the end of the game tho, as performance and back pressure issues arises whith a successful project... Testing is a long and interesting process.


Mocking out a repository is IMO a lot less bad than mocking out an actual database connection. That's probably one of the biggest arguments in favor of the repository pattern: the ability to replace the repository with a test double of some kind.


Do you know why zapatos relies on pg and not PostgresJs?


Hi gajus! slonik is a very handy tool, and I used it in production for a quiet some years with success.

Is there any plan to move to PostgresJs instead of pg? If not, would you mind explaining why sticking with pg?


You can already use postgres with Slonik.

https://github.com/gajus/slonik#user-content-slonik-how-are-...

It is not going to be the default because it is way slower.

https://github.com/gajus/slonik/actions/runs/6616647651

Test node_version:18 test_only:postgres-integration is taking 3 minutes.

Test node_version:18 test_only:pg-integration is taking 38 seconds.

It is possible that this is an issue with https://github.com/gajus/postgres-bridge, but I was not able to pinpoint anything in particular that would explain the time difference.


Very useful tool thank you! We may release a nestjs support soon for Zapatos.


PrestaShop | Remote | Once a month at Paris Headquarters | Full time | https://prestashop.com

PrestaShop is an open source e-commerce platform. It is currently used by 300,000 shops worldwide and is available in 60 different languages.

2022 is a year of acceleration for our company, as we double our workforce and are hiring 200 new employees to fulfill our ambitions. Since last July, the "work from anywhere" program is the rule, and allows every employee to work from almost any place in the world. Tools and processes to work remotely were already in place before the COVID-19 pandemic, and are at the very heart of our organization.

On the tech side we work with various languages and ecosystems, mainly PHP/Symfony/VueJS if you work for the PrestaShop core and modules teams. Node.js/NestJs/VueJS if your work for extensions and service teams (like I do). We perform CI/CD with terraform and K8S, EventModeling and EventSourcing handled with EventStore, and a lot more...

You can find and apply to our open positions here: https://jobs.lever.co/prestashop?lever-via=IJ5EwbW8Gx. Thank you!


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: