@apistudio/apim-cli
Version:
CLI for API Management Products
26 lines (16 loc) โข 687 B
Markdown
## ๐งช ESM Tests
ESM-based tests (files like `*.test-esm.ts`) are handled separately from the main Jest configuration.
### ๐ Why are ESM tests excluded from the default config?
The main `jest.config.json` is configured for CommonJS and TypeScript.
To avoid conflicts and support native ESM features, ESM tests are excluded using:
```json
"testPathIgnorePatterns": ["\\.test-esm\\.tsx?$"]
```
These tests are executed using a dedicated config: `jest.config.esm.json`.
### ๐ Running ESM Tests
You can run ESM tests using the following npm scripts:
```bash
npm run test-esm # Run ESM tests only
npm run test-esm-coverage # Run ESM tests with coverage
```