Skip to main content

test

Write and run Elastic CLI unit and functional tests.

소스 정보

저장소
elastic/cli
최근 소스 활동
2026년 9월 28일 18:54
감지된 SKILL.md 언어
영어
스타
47
포크
27

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
test
description
Write and run Elastic CLI unit and functional tests.
# Test Framework: Node.js `node:test` plus `node:assert/strict`. Files live in `test/**/*.test.ts`. ```bash npm test npx tsx --test test/**/*.test.ts npx tsc --noEmit ``` `npm test` builds, then runs unit tests with coverage (90% lines/branches/functions on `src/` and `packages/*/src`, excluding generated manifests). Every bug fix needs a regression test that would have caught it. For URL/path/query builders, add adversarial inputs (`../`, `?#`, empty, special characters). For HTTP clients, assert the full `RequestInit` (`redirect`, `credentials`, headers), not just the response. Cover failure responses, not only success fixtures. Do not weaken assertions, skip cases, or add production special cases to satisfy a bad test. The `cli.test.ts` config caching case is a known pre-existing failure; ignore only that one. Functional: `ELASTIC_CLI_CONFIG_FILE` must be unset unless pointing at an intentional fixture. ES: `npm run test:functional:es`. Kibana: `ELASTIC_CLI_CONFIG_FILE=/tmp/local-rc.yml npm run test:functional:kb`. Cloud: `npm run test:functional:cloud`.
GitHub에서 보기