Integration tests don't execute custom links, only core medusa links. Also get-port dependency seems missing.
Describe the bug
I've created basic integration tests based on documentation and code from medusa repository integration-tests.
My modules migrations are executed correctly, however custom links I've created are skipped. I executed this code block in my integration test, which solved the issue, but of course it would be nice if it worked natively:
beforeAll(async () => {
/* Execute custom links, as default links creator doesn't see them for some reason */
const appLoader = new MedusaAppLoader();
const planner = await appLoader.getLinksExecutionPlanner();
const actionPlan = await planner.createPlan();
await planner.executePlan(actionPlan);
});
Also dependency get-port is missing. It's strange, but it doesn't load usin yarn install, even though it's present in dependencies of medusa-test-utils. Integration tests work after I've executed yarn add --dev get-port@^5.1.0.
System information
Medusa version (including plugins): 2.0 preview from 19.09.2024r.
Node.js version: 20.16.0
Database: PostgreSQL
Operating system: Windows 10
Browser (if relevant): -
Steps to reproduce the behavior
Create custom link in /src/links
Create integration test
yarn build and run integration tests
See error - logs from sync link don't include custom link table, and trying to fetch entity with linked table will throw error in tests.
Expected behavior
Custom links should be automatically included in integration tests. Get-port dependency should be automatically installed.
The get-port dependency has been fixed end of last week.
For the custom links loading, I ve just created a pr on which I will generate a snapshot 👍 thanks for the report
Bug report
Integration tests don't execute custom links, only core medusa links. Also get-port dependency seems missing.
Describe the bug
I've created basic integration tests based on documentation and code from medusa repository integration-tests.
My modules migrations are executed correctly, however custom links I've created are skipped. I executed this code block in my integration test, which solved the issue, but of course it would be nice if it worked natively:
Also dependency get-port is missing. It's strange, but it doesn't load usin yarn install, even though it's present in dependencies of medusa-test-utils. Integration tests work after I've executed
yarn add --dev get-port@^5.1.0
.System information
Medusa version (including plugins): 2.0 preview from 19.09.2024r. Node.js version: 20.16.0 Database: PostgreSQL Operating system: Windows 10 Browser (if relevant): -
Steps to reproduce the behavior
Expected behavior
Custom links should be automatically included in integration tests. Get-port dependency should be automatically installed.