SKILL.md
Testing skill (contentstack-cli-tsgen)
Commands
| Command | What it does |
|---|---|
npm test |
Jest with --testPathPattern=tests; then posttest runs ESLint ([package.json](../../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](../../jest.config.js): ts-jest,testEnvironment: node.
Integration tests
- [tests/integration/tsgen.integration.test.ts](../../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.
CI
- [.github/workflows/node.js.yml](../../.github/workflows/node.js.yml):
npm ci, optionalnpm run build --if-present, global@contentstack/cli,csdx config:set:region,csdx auth:tokens:add(delivery),npm run prepack,csdx plugins:link,npm testwithTOKEN_ALIASsecret.