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

Đang mở
#286 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@tylrcc đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #295 của @tylrcc — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
cli, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
2
Fork
2
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NanoForge-dev/CLI

Tất cả issue của NanoForge-dev/CLI

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.