Use this skill to choose the smallest credible validation set for an ioredis change, run it when feasible, and report exactly what passed, failed, or was skipped.
Workflow
-
Inspect the diff and changed files before choosing commands.
- Use
git diff --stat,git diff --name-only, and targeted file reads. - Do not stage, unstage, or commit unless the user explicitly asks.
- Treat
built/andlib/utils/RedisCommander.tsas generated outputs; do not hand-edit them.
- Use
-
Classify the change.
- Runtime code under
lib/: run focused tests plus build when the change affects exported declarations or compiled output. - Redis command typing or generated command support: inspect
bin/config, regenerate withnode bin/index.jsif needed, and run tsd or targeted typing tests. - Functional Redis behavior: run the smallest relevant Mocha files and assume a compatible Redis server is on default host/port. If sandboxed Redis access is blocked, ask for permission rather than assuming Redis is unavailable.
- Cluster behavior: use
npm run docker:setupif infrastructure is needed, then targetedtest/cluster/**/*.tsornpm run test:cluster. - Docs-only changes: run
npm run format-checkonly if formatting-sensitive files changed; otherwise inspect rendered Markdown manually. - Build/tooling changes: run
npm run buildand the affected script directly.
- Runtime code under
-
Prefer focused validation before broad validation.
- For self-contained pure unit files, run the test file alone first:
TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test npx mocha --no-experimental-strip-types "test/unit/<file>.ts". - Include
test/helpers/*.tsonly when the unit file relies on global hooks or helper setup. - Functional command change: include
test/helpers/*.tsand the specifictest/functional/...file. - Typing change:
npm run buildthennpx tsd --files test/typing/<file>.test-d.tswhen a focused file exists. - Public API or cross-cutting behavior: escalate to
npm testafter focused tests pass. - Formatting-only TypeScript edits: run
npm run lintornpm run format-checkas appropriate.
- For self-contained pure unit files, run the test file alone first:
-
Handle generated artifacts deliberately.
- If
bin/argumentTypes.js,bin/returnTypes.js,bin/overrides.js,bin/sortArguments.js,bin/typeMaps.js, orbin/template.tschanges command declarations, regeneratelib/utils/RedisCommander.tswithnode bin/index.js. - If generated output changes unexpectedly, inspect the generator inputs before accepting it.
- Build output in
built/is publish-facing but generated bynpm run build; mention if it is intentionally not updated.
- If
-
Report results in handoff.
- List each command run and its result.
- For failures, include the failing test name or key error line and whether it appears related.
- For skipped commands, state the concrete reason, such as missing Redis server, blocked sandbox access, or out-of-scope broad suite.
Command Reference
npm run build: removebuilt/and compile TypeScript.npm run lint: ESLint overlib/.npm run format-check: Prettier check.npm run test:js: non-cluster Mocha suite over helpers, unit, and functional tests.npm run test:cluster: cluster Mocha suite.npm run test:tsd: build and run all tsd tests.npm test:test:jsplustest:tsd.npm run docker:setup/npm run docker:teardown: start/stop Redis test infrastructure.