Skip to content

Maintenance: scope test:unit to tests/unit and normalise package scripts #5643

Description

@svozza

Summary

Six packages (commons, batch, jmespath, kafka, testing, validation) define test:unit as bare vitest --run. Their vitest configs set no include, so the default glob matches tests/e2e/*.test.ts as well. In batch, npm run test:unit therefore tries to run the SQS e2e suite locally. CI is unaffected because it calls test:unit:coverage, which already scopes to tests/unit.

The other scripts have drifted in spelling too. test:e2e has five different placeholder forms (echo 'Not implemented', echo "Not implemented", echo 'Not Applicable', echo 'Not applicable for this package') and one package uses vitest run instead of vitest --run. test:unit:types has two flag orders (--run tests/types --typecheck and --typecheck --run tests/types) and two placeholder spellings.

Why is this needed?

A developer running unit tests for batch, or any of the five other packages, gets an e2e suite that needs AWS credentials and fails or hangs. The placeholder drift is cosmetic but defeats grepping for which packages lack a given suite, and every new package copies whichever variant its author happened to open.

Which area does this relate to?

Tests, Automation

Solution

  • Set test:unit to vitest --run tests/unit in the six packages.
  • Pick one placeholder string, for example echo 'Not Implemented', and one flag order, and apply them to test:e2e and test:unit:types across packages/*. CODING_STANDARDS.md can name the canonical forms so new packages copy the right one.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

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

    good-first-issueSomething that is suitable for those who want to start contributinginternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions