You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m currently working on optimizing my development workflow for integration tests using Jest, and I’ve encountered a challenge I hope to get some advice on.
Current Setup
I’m using Jest with the Medusa test utilities (@medusajs/test-utils) for integration tests. Here’s what I’m doing:
1. Each test suite initializes a test database.
2. Migrations are run before the tests begin.
3. I use Jest’s --watchAll mode to re-run tests when files change.
The Problem
Every time a test changes in watch mode, the migrations are re-applied, which is time-consuming and significantly slows down the feedback loop. This makes iterating on tests tedious.
My Current Jest Debugging Configuration
Here’s my launch.json for debugging in VS Code with watch mode enabled:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m currently working on optimizing my development workflow for integration tests using Jest, and I’ve encountered a challenge I hope to get some advice on.
Current Setup
I’m using Jest with the Medusa test utilities (@medusajs/test-utils) for integration tests. Here’s what I’m doing:
1. Each test suite initializes a test database.
2. Migrations are run before the tests begin.
3. I use Jest’s
--watchAll
mode to re-run tests when files change.The Problem
Every time a test changes in watch mode, the migrations are re-applied, which is time-consuming and significantly slows down the feedback loop. This makes iterating on tests tedious.
My Current Jest Debugging Configuration
Here’s my launch.json for debugging in VS Code with watch mode enabled:
What I’d Like to Achieve
Beta Was this translation helpful? Give feedback.
All reactions