# Testing

> Use for Mocha/NYC unit tests, API tests, and Jest TypeScript tests in contentstack-marketplace-sdk.

- Skill: `contentstack/testing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add contentstack/testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/contentstack/testing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs, Coding & Dev Tools
- Author: contentstack (https://skillmd.com/u/contentstack)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/contentstack/testing

---


# Testing – contentstack-marketplace-sdk

## When to use

- Adding tests under `test/unit` or API suites
- Working with `nyc` coverage or mochawesome reports

## Instructions

### Runners

- **Mocha** with **`@babel/register`** for most suites; **`nyc`** wraps coverage.
- **`npm run test:typescript`** runs **Jest** with `jest.config.js` for TypeScript-focused tests.

### Reports

- Sanity HTML reports (`test:sanity-report`) are optional helpers—do not commit generated artifacts meant for CI only.

### Mocking

- **nock** / **axios-mock-adapter** patterns may exist—keep tests hermetic without real network when possible.

