Papooch / nestjs-cls

A continuation-local storage (async context) module compatible with NestJS's dependency injection.
https://papooch.github.io/nestjs-cls/
MIT License
453 stars 29 forks source link

How to get a real database transaction in a test environment? #139

Closed sam-artuso closed 7 months ago

sam-artuso commented 7 months ago

I'm writing some database integration tests. I'd like to run my queries inside a real database transaction. How to get a real database transaction in a test environment?

Papooch commented 7 months ago

I'm not sure I understand what you mean by a test environment.

If you spin up a real database in your test environemnt then you can get a real database transaction in the test application.

Could you be a little more specific?

sam-artuso commented 7 months ago

I'm sorry, this is due to a total misunderstanding on my side. Please ignore.