You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DX-5353 — Developer experience: tests, Jest coverage, and Cursor guidance
Summary
This branch expands automated test coverage across commands, core logic, utilities, and the Contentstack HTTP client, adds Jest coverage reporting with enforced global thresholds, and introduces repository documentation for contributors and AI-assisted workflows (root AGENTS.md, Cursor rules under .cursor/rules/, and project skills under .cursor/skills/). Dependency lockfile and a few dev dependency pins were refreshed to support the test and tooling setup.
What changed
Tests
Commands (tests/commands/content-type/): list, details, audit, compare, compare-remote, diagram — parse, flags, and integration-style runs with mocked ContentTypeCommand / dependencies.
Utils (tests/utils/index.test.ts): Management SDK helpers and error paths with mocks.
Tooling
jest.config.js: collectCoverageFrom for src/**/*.ts, reporters (text, text-summary, lcov, html), global coverageThreshold at 80% for branches, functions, lines, and statements.
package.json: test:coverage script; related dev dependency bumps; @contentstack/cli-utilities patch bump.
Documentation (contributor / IDE)
AGENTS.md: Project role, stack, scripts, workflow, coverage notes, links to .cursor rules and skills, SECURITY.md.
.cursor/rules/: Indexed in README.md — plugin, testing, review, TypeScript build, ESLint, oclif docs, dev workflow.
.cursor/skills/: Plugin skill with references/architecture.md and commands.md; testing skill with conventions.md and jest-mocking.md; review skill with checklist.md.
Confirm test:coverage meets the 80% global thresholds. ESLint is invoked after Jest via posttest; ensure your install matches package-lock.json so @typescript-eslint rules resolve (same as CI).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DX-5353 — Developer experience: tests, Jest coverage, and Cursor guidance
Summary
This branch expands automated test coverage across commands, core logic, utilities, and the Contentstack HTTP client, adds Jest coverage reporting with enforced global thresholds, and introduces repository documentation for contributors and AI-assisted workflows (root
AGENTS.md, Cursor rules under.cursor/rules/, and project skills under.cursor/skills/). Dependency lockfile and a few dev dependency pins were refreshed to support the test and tooling setup.What changed
Tests
tests/commands/content-type/): list, details, audit, compare, compare-remote, diagram — parse, flags, and integration-style runs with mockedContentTypeCommand/ dependencies.tests/core/):command.test.ts,content-type/*(audit, compare, details, diagram, formatting, list),contentstack/client.test.ts,contentstack/error.test.ts.tests/utils/index.test.ts): Management SDK helpers and error paths with mocks.Tooling
jest.config.js:collectCoverageFromforsrc/**/*.ts, reporters (text,text-summary,lcov,html), globalcoverageThresholdat 80% for branches, functions, lines, and statements.package.json:test:coveragescript; related dev dependency bumps;@contentstack/cli-utilitiespatch bump.Documentation (contributor / IDE)
AGENTS.md: Project role, stack, scripts, workflow, coverage notes, links to.cursorrules and skills,SECURITY.md..cursor/rules/: Indexed inREADME.md— plugin, testing, review, TypeScript build, ESLint, oclif docs, dev workflow..cursor/skills/: Plugin skill withreferences/architecture.mdandcommands.md; testing skill withconventions.mdandjest-mocking.md; review skill withchecklist.md.Confirm
test:coveragemeets the 80% global thresholds. ESLint is invoked after Jest viaposttest; ensure your install matchespackage-lock.jsonso@typescript-eslintrules resolve (same as CI).