Skip to content

test(sdk-typescript): pass jest target when no test files exist#617

Open
G4614 wants to merge 1 commit into
boxlite-ai:mainfrom
G4614:fix/sdk-typescript-jest-pass-with-no-tests
Open

test(sdk-typescript): pass jest target when no test files exist#617
G4614 wants to merge 1 commit into
boxlite-ai:mainfrom
G4614:fix/sdk-typescript-jest-pass-with-no-tests

Conversation

@G4614
Copy link
Copy Markdown
Contributor

@G4614 G4614 commented May 28, 2026

#460 added test config but didn't add real tests, now pass with no test should be set

Test plan

yarn nx test sdk-typescript --skip-nx-cache (no VM):

jest config result
without passWithNoTests FAILNo tests found, exiting with code 1 (nx task fails, rc=1)
with passWithNoTests: true PASSNo tests found, exiting with code 0 (rc=0)

@nx/jest/plugin (apps/nx.json) infers a `test` target from this
project's jest.config.js. The package has no test files yet, and jest
exits non-zero on "No tests found" by default, so `nx run sdk-typescript:test`
(and `make test:apps` which fans out to it) fails with exit code 1.

Set `passWithNoTests: true` in the jest config so the empty case is a
success. Real test failures, once tests are added, still fail.

Verified: `yarn nx run sdk-typescript:test` → "exiting with code 0".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@G4614 G4614 marked this pull request as ready for review May 28, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant