Errors When Running Tests
This troubleshooting guide covers common errors you may encounter when running tests in your Medusa application and how to resolve them.
Loaders for module Workflows failed#
If you get the following error when running your tests:
This may occur if you have multiple test files and you don't configure your Jest environment correctly. To resolve this, add the following configuration to your jest.config.js file:
Then, create the integration-tests/setup.js file with the following content:
Note: If you're using a version prior to Medusa v2.11.0, change
@medusajs/framework/mikro-orm/core to @mikro-orm/core. Learn more in the v2.11.0 codemod.Refer to the Testing Tools guide for more details.
Was this page helpful?