fix: add --passWithNoTests to driver-utils test script#312
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a CI failure in @objectql/driver-utils by adding the --passWithNoTests flag to the Jest test script, allowing the build to pass when no test files are present.
Changes:
- Modified the test script in
packages/drivers/utils/package.jsonto include--passWithNoTestsflag
| "scripts": { | ||
| "build": "tsc", | ||
| "test": "jest" | ||
| "test": "jest --passWithNoTests" |
There was a problem hiding this comment.
While this fix is correct for the immediate CI issue, there's an inconsistency across the monorepo. Several other packages also have no test files but use "test": "jest" without the --passWithNoTests flag (e.g., @objectql/driver-sql, @objectql/driver-memory, @objectql/core, @objectql/plugin-validator). These packages would also fail CI if their test scripts are executed.
Consider either:
- Adding --passWithNoTests to all packages without tests for consistency
- Or adding placeholder test files to maintain the ability to detect when test execution genuinely fails
The current approach creates an inconsistent testing configuration across the monorepo.
CI failing on
@objectql/driver-utils#testbecause Jest exits with code 1 when no test files exist.Changes
--passWithNoTestsflag to test script inpackages/drivers/utils/package.jsonAligns with existing pattern in
@objectql/typesand@objectql/plugin-security.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.