testing
작성자: contentstack
datasync-asset-store-filesystem에 대한 Jest 테스트 및 커버리지 — 테스트 레이아웃, 사전 테스트 빌드, 커버리지 출력에 사용합니다.
npx skills add https://github.com/contentstack/datasync-asset-store-filesystem --skill testingTesting – 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 testruns Jest with--coverage.pretestrunsnpm run build-tsand removes_contentsandcoverageso tests run against a fresh build and clean asset dirs where relevant. - Test files:
jest.config.jssetstestRegex: "./test/.*.js$"andtestEnvironment: "node". Tests are JavaScript undertest/, not co-located*.spec.tsinsrc/. - Coverage: Output directory
coverage/; reporters includejsonandhtml.coveragePathIgnorePatternsexcludesnode_modules,test-utils,test_content, and parts ofdist/— adjust injest.config.jsif you add new paths that should be ignored or included. - Integration style:
example/andtest/may use mocks; avoid committing real API keys or secrets (align with Talisman/Snyk expectations if hooks are used).