Skip to content

SW-213 — Reject empty test scripts during project test-plan resolution #395

Open

Description

@dDevAhmed

Summary

The test resolver accepts a string-valued scripts.test entry even when it is empty or whitespace-only. npm may treat an empty test script as a successful no-op, making stellarforge test report success without running tests. Reject blank scripts before spawning npm.

Workstream

  • Workstream: WS-TESTING
  • Primary scope: src/testing/project.ts; tests/test-project.test.ts
  • Protected surface: No
  • Priority: P1
  • Difficulty: low
  • Proposed points: 100

Acceptance Criteria

  • Empty and whitespace-only test scripts are rejected.
  • The validation error explains that a non-empty test script is required.
  • No subprocess is spawned for an empty script.
  • Valid scripts continue to resolve unchanged.
  • Tests cover spaces, tabs, and newline-only values.

Dependencies

None.

Out of Scope

  • Unrelated architecture or public command-contract changes.
  • New runtime dependencies without maintainer approval.
  • Mainnet deployment or remote template execution.

Definition of Done

  • Acceptance criteria have deterministic regression coverage.
  • Security and compatibility boundaries remain intact.
  • Supported-platform CI passes.

Labels

  • Stellar Wave (do not apply until activation is explicitly authorized)
  • type: bug
  • area: testing
  • priority: P1
  • difficulty: low
  • points: 100
  • workstream: testing

Sequencing and scope note

Sequencing: implement after SW-214 (#396) and SW-215 (#397). This covers a present-but-empty scripts.test value; #119 covers project detection and unsupported project markers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    intake: queuedWave backlog not yet open for claims

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions