testing
Installation
SKILL.md
Testing skill (contentstack-cli-tsgen)
Commands
| Command | What it does |
|---|---|
npm test |
Jest with --testPathPattern=tests; then posttest runs ESLint (package.json) |
npm run test:integration |
Jest only for tests/integration |
npm run prepack |
Build lib/ (required before local csdx plugins:link style workflows) |
Config
jest.config.js: ts-jest,testEnvironment: node.
Integration tests
- tests/integration/tsgen.integration.test.ts spawns
csdx tsgenwithTOKEN_ALIAS. - Loads
.envfrom package root viadotenv(pathrelative to test file).TOKEN_ALIASmust be defined or the suite throws at load time.