# Testing

> Use for Jest, Playwright e2e, API tests, and bundler smoke tests in contentstack-typescript. Use when this capability is needed.

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

---


# Testing – contentstack-typescript

## When to use

- Adding or fixing tests under `test/unit`, `test/api`, or browser/e2e flows
- Investigating failures in `test/bundlers` or Playwright

## Instructions

### Layers

- **Unit**: `npm run test:unit` → `jest ./test/unit`.
- **API**: `npm run test:api` — may require stack credentials via env files (see project docs and `.gitignore`).
- **Browser**: `npm run test:browser` uses a dedicated Jest config.
- **E2E**: `npm run test:e2e` builds a browser bundle then runs Playwright—slower; run before large release changes.
- **Bundlers**: `test/bundlers/` exercises webpack/vite/rollup/next/esbuild—run `npm run validate:bundlers` when changing packaging.

### Hygiene

- Do not commit secrets or live tokens; use fixtures or CI secrets only where documented.

---
> Source: [contentstack/contentstack-typescript](https://github.com/contentstack/contentstack-typescript) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-16 -->

