Cursor rule
.cursor/rules/testing.mdcJest tests, mocks, reports, and environments for @contentstack/utils
Cursor rules
Quality
71/100
Scores the file, not the repository.Length
144 words
7 headings · 0 code blocksRepository
5
— · pushed 1 days agoLast changed
3 days ago
First indexed 3 days ago.12345678# Testing — `@contentstack/utils`910## Framework1112- **Jest 29** with **`ts-jest`** preset (`jest.config.ts`).13- **Environment:** **`jsdom`** (suitable for HTML string assertions and DOM-related behavior).1415## Discovery and naming1617- **Pattern:** `**/__test__/**/?(*.)+(spec|test).[jt]s?(x)` — this repo uses `*.test.ts` under **`__test__/`**.18- **Mocks / fixtures:** `__test__/mock/*.ts` — follow existing mock naming (`*-mock.ts`).1920## Coverage and reports2122- **Coverage** is collected from `src/**` excluding `src/index.ts` (`collectCoverageFrom`).23- Outputs: **`reports/coverage/`**, **`reports/html/`** (jest-html-reporters), **`reports/junit/`** (jest-junit), **`reports/report.json`** (from `npm test` script).2425## Running tests2627| Command | Behavior |28|---------|----------|29| `npm test` | Runs **`pretest` → build** then Jest (CI-aligned). |30| `npm run test:debug` | Watch mode, `--runInBand`. |3132## Integration / live tests3334- **None** in this repo. No `.env` or stack credentials required for **`npm test`**.3536## Build dependency3738- **`npm test` always builds first** (`pretest`). Ensure **`src/assets/regions.json`** exists or can be downloaded so `endpoints` tests pass.39
Also in contentstack/contentstack-utils-javascript
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| contentstack/contentstack-utils-javascript.cursor/rules/code-review.mdc · 5 | Cursor rules | testgitdependenciesapi+1 | 56/100 | 3 days ago | |
| contentstack/contentstack-utils-javascript.cursor/rules/typescript-contentstack-utils.mdc · 5 | Cursor rules | styledocs | 56/100 | 3 days ago | |
| contentstack/contentstack-utils-javascript.cursor/rules/typescript.mdc · 5 | Cursor rules | testlint-formatstylearch+2 | 82/100 | 3 days ago | |
| contentstack/contentstack-utils-javascriptAGENTS.md · 5 | AGENTS.md | setupbuildtestlint-format+6 | 90/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
