# Testing

> Jest tests and coverage for datasync-asset-store-filesystem — use for test layout, pretest build, and coverage output. Use when this capability is needed.

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

---


# Testing – DataSync Asset Store Filesystem

## When to use

- Adding or changing tests under `test/`
- Interpreting coverage reports or Jest configuration
- Debugging `pretest` / build ordering before tests run

## Instructions

- **Runner:** `npm test` runs Jest with `--coverage`. `pretest` runs `npm run build-ts` and removes `_contents` and `coverage` so tests run against a fresh build and clean asset dirs where relevant.
- **Test files:** `jest.config.js` sets `testRegex: "./test/.*.js$"` and `testEnvironment: "node"`. Tests are JavaScript under `test/`, not co-located `*.spec.ts` in `src/`.
- **Coverage:** Output directory `coverage/`; reporters include `json` and `html`. `coveragePathIgnorePatterns` excludes `node_modules`, `test-utils`, `test_content`, and parts of `dist/` — adjust in `jest.config.js` if you add new paths that should be ignored or included.
- **Integration style:** `example/` and `test/` may use mocks; avoid committing real API keys or secrets (align with Talisman/Snyk expectations if hooks are used).

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

