docs: add prerequisites link for test guides (#9057)
- Add a prerequisites link to test guides pointing to how to setup the testing tools - Add in the main http / module integration guides the command to run the tests
This commit is contained in:
+12
-1
@@ -1,3 +1,5 @@
|
||||
import { Prerequisites } from "docs-ui"
|
||||
|
||||
export const metadata = {
|
||||
title: `${pageNumber} Example: Write Integration Tests for API Routes`,
|
||||
}
|
||||
@@ -6,6 +8,15 @@ export const metadata = {
|
||||
|
||||
In this chapter, you'll learn how to write integration tests for API routes using the [medusaIntegrationTestRunner utility function](../page.mdx).
|
||||
|
||||
<Prerequisites
|
||||
items={[
|
||||
{
|
||||
text: "Testing Tools Setup",
|
||||
link: "/debugging-and-testing/testing-tools"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
## Test a GET API Route
|
||||
|
||||
Consider the following API route created at `src/api/store/custom/route.ts`:
|
||||
@@ -73,7 +84,7 @@ If you don't have a `test:integration` script in `package.json`, refer to the [M
|
||||
|
||||
</Note>
|
||||
|
||||
This runs your Medusa application and runs the tests available under the `src/integrations` directory.
|
||||
This runs your Medusa application and runs the tests available under the `src/integrations/http` directory.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user