docs: changed the steps to run tests in local dev (#2786)
This commit is contained in:
1 parent
e174443ecf
commit
a77b4a1b7e
1 file changed
+5
-37
@@ -76,54 +76,22 @@ yarn test
|
|||||||
|
|
||||||
### Run API Integration Tests
|
### Run API Integration Tests
|
||||||
|
|
||||||
API integration tests are used to test out Medusa’s core endpoints. To run the API integration tests:
|
API integration tests are used to test out Medusa’s core endpoints.
|
||||||
|
|
||||||
1. Change to the `integrations-tests/api` directory:
|
To run the API integration tests, run the following command in the root directory of the repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd integration-tests/api
|
yarn test:integration:api
|
||||||
```
|
```
|
||||||
|
|
||||||
2\. Install dependencies using Medusa’s dev CLI tool:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
medusa-dev --force-install --external-registry
|
|
||||||
```
|
|
||||||
|
|
||||||
3\. Run the test command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn test
|
|
||||||
```
|
|
||||||
|
|
||||||
:::info
|
|
||||||
|
|
||||||
The `--force-install` option passed to `medusa-dev` ensures that the packages are installing from the local registry rather than copied as explained in [the next section](#test-in-a-local-server).
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
### Run Plugin Integration Tests
|
### Run Plugin Integration Tests
|
||||||
|
|
||||||
Plugin integration tests are used to test out Medusa’s official plugins, which are also stored in the `packages` directory in the repository.
|
Plugin integration tests are used to test out Medusa’s official plugins, which are also stored in the `packages` directory in the repository.
|
||||||
|
|
||||||
To run the plugin integration tests:
|
To run the plugin integration tests, run the following command in the root directory of the repository:
|
||||||
|
|
||||||
1. Change to the `integrations-tests/plugins` directory:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd integration-tests/plugins
|
yarn test:integration:plugins
|
||||||
```
|
|
||||||
|
|
||||||
2\. Install dependencies using Medusa’s dev CLI tool:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
medusa-dev --force-install --external-registry
|
|
||||||
```
|
|
||||||
|
|
||||||
3\. Run the test command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn test
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Test in a Local Server
|
## Test in a Local Server
|
||||||
|
|||||||
Reference in new issue
Block a user