Replies: 1 comment 3 replies
-
I would need a bit more info to share an accurate way to mutate env variables for your use-case. If you just want to override an env variable, then you may use the In AdonisJS, the app is booted once and then all tests are executed against the same instance. Which means, the app is not re-booted for every single test or test file. What I would like to know is
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm coming from nestjs and jest / vitest and currently evaluate if japa is a better test runner for my adonisjs app.
I came across the problem that I found no way of tempering with the env-vars before the app starts for my test.
In my nestjs tests I would do something like:
Is this possible with japa and adonisjs?
My current usecase is that I need to restart a container on every test run, since it does not support deleting data. But other usecases would be to test if e.g. feature-toggles work.
For how to get testcontainers working in general I found https://github.com/orgs/adonisjs/discussions/4453 , but sadly this is not as useful for my case, since I want a "changing container"
Beta Was this translation helpful? Give feedback.
All reactions