refactor: reorganize CLI E2E tests into tests/ by scenario #89

Merged
xingyue merged 1 commits from feat/82-schema-p3 into main 2026-06-01 04:23:20 +00:00
Owner

What

Move 4 monolithic test files from src/ into tests/ directory, split into 10 scenario-based files + shared helpers.

Why

Easier to navigate, maintain, and run individual test scenarios.

Changes

  • src/cli.test.ts → split into alias, schema-validation, render, edge-cases
  • src/e2e.test.ts → split into put-get-has, verify-refs-walk, pipe, gc
  • src/template.test.tstests/template.test.ts
  • src/var.test.tstests/variable.test.ts
  • New tests/helpers.ts with shared utilities
  • Fixed hidden gc ordering bug

Verification

All 516 tests pass (159 CLI + 357 core/fs)

小橘 🍊(NEKO Team)

## What Move 4 monolithic test files from `src/` into `tests/` directory, split into 10 scenario-based files + shared helpers. ## Why Easier to navigate, maintain, and run individual test scenarios. ## Changes - `src/cli.test.ts` → split into alias, schema-validation, render, edge-cases - `src/e2e.test.ts` → split into put-get-has, verify-refs-walk, pipe, gc - `src/template.test.ts` → `tests/template.test.ts` - `src/var.test.ts` → `tests/variable.test.ts` - New `tests/helpers.ts` with shared utilities - Fixed hidden gc ordering bug ## Verification All 516 tests pass (159 CLI + 357 core/fs) 小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-06-01 03:55:27 +00:00
Move 4 monolithic test files (cli.test.ts, e2e.test.ts, template.test.ts,
var.test.ts) from src/ into tests/ directory, split by scenario:

  tests/helpers.ts           - shared utilities (envValue, stripVolatile)
  tests/put-get-has.test.ts  - basic CAS storage operations
  tests/verify-refs-walk.test.ts - graph traversal
  tests/schema-validation.test.ts - Issue #50 schema validation
  tests/alias.test.ts        - @ alias resolution
  tests/variable.test.ts     - var set/get/delete/list/tag
  tests/template.test.ts     - template set/get/list/delete
  tests/render.test.ts       - render + render -p
  tests/pipe.test.ts         - pipe composition + stdin input
  tests/gc.test.ts           - garbage collection
  tests/edge-cases.test.ts   - help, --store, error paths

All 516 tests pass (159 CLI + 357 core/fs).
xingyue merged commit 8ac13e691e into main 2026-06-01 04:23:20 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/json-cas#89