Skip to content

_-prefixed packages have tests but no test script, so yarn test-packages skips them #1142

Description

@nealrichardson

Bug

These workspaces have tests (test/basic.test.ts) but no scripts at all in their package.json:

  • packages/_annotated-json
  • packages/_mapped-string
  • packages/_tidyverse-errors
  • packages/_json-validator

yarn test-packages runs turbo run test --filter='./packages/*', which only runs workspaces that define a test script, so these tests are silently skipped locally and in CI (.github/workflows/test.yaml). The _-prefixed packages are what the shipped extension actually uses. Their published, non-prefixed siblings (packages/annotated-json, etc.) do have "test": "node --import tsx --test test/*.test.ts".

Fix

Add the same test script to each _ package, and make sure tsx is declared as a devDependency (it is in the plan's inventory). Then run yarn test-packages and fix any tests that fail after going unrun for a while.

Note that node --import tsx needs Node ≥18.18/20.6. .nvmrc currently pins 18.12.1, which can't run it (the Node 24 bump in the upgrade plan fixes that). CI uses node-version: latest, so it works there.

Separately, _json-validator isn't imported anywhere. Consider deleting it rather than wiring up its tests.

Found during the dependency-upgrade research.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions