No unit tests for the build and start actions and the fs utils

Aperta
#286 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@tylrcc ci sta già lavorando.

Dal 11/11/2026.

  • #295 di @tylrcc — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
cli, testing

Direzione di ricerca

Start with the referenced files: src/lib/utils/files.ts, src/action/actions/build.action.ts, and src/action/actions/start.action.ts; check existing test conventions and e2e/cli-build.test.ts for setup. Add unit coverage for nested assets and refused output folders, p2p target resolution, environment prefix splitting, and TLS resolution. Done means these cases are covered by passing tests; pull request #295 is already open against this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

command:build enhancement tests
Which package is this feature request for?

@nanoforge-dev/cli

Which command is this feature request for?

build

Feature

The code that deletes folders (resetFolder), copies assets (copyFiles), builds the p2p targets, resolves TLS and splits the NANOFORGE_CLIENT_*/NANOFORGE_SERVER_* env has no unit tests. There is no files.spec.ts, build.action.spec.ts, start.action.spec.ts or package-manager.spec.ts (src/lib/utils/files.ts#L1, src/action/actions/build.action.ts#L1, src/action/actions/start.action.ts#L1, src/lib/package-manager/package-manager.ts#L1). e2e/cli-build.test.ts only copies flat assets (line 70) and only tries a safe custom output folder (line 55). That is how the output-folder deletion and the nested-assets EISDIR bugs went unnoticed.

Found during a read-only audit of main at e95b881 (2026-11-11).

Ideal solution or implementation

Unit tests for:

  • files.ts: nested assets, and the output folders that must be refused;
  • BuildAction.resolveTargets in p2p mode;
  • StartAction.parseEnv (prefix split) and resolveTLS.
Alternative solutions or implementations

No response

Other context

No response

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
2g 18h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NanoForge-dev/CLI

Tutte le issue di NanoForge-dev/CLI

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.