-
Notifications
You must be signed in to change notification settings - Fork 31
refactor: move contract tests to server-node package #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
| "lint:fix": "yarn run lint -- --fix", | ||
| "test": "echo Please run tests for individual packages.", | ||
| "coverage": "npm run test -- --coverage", | ||
| "contract-test-service-build": "yarn workspaces foreach -pR --topological-dev --from 'node-server-sdk-contract-tests' run build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned contract-test-harness script is now unused
Low Severity
The contract-test-harness script remains in package.json but is no longer used anywhere. It was previously invoked by the contract-tests script which has been removed. The script is not referenced in any GitHub workflows or other scripts, making it dead code that could confuse future developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there can still be some uses for this as reference to run the test harness
This is a refactor to move the contract tests to the server-node package.
76379fa to
7172cdd
Compare
CONTRIBUTING.md
Outdated
| For more information [see here](https://github.com/launchdarkly/sdk-test-harness). | ||
|
|
||
| Note that not all packages in this monorepo has implemented contract tests. The ones that | ||
| have contract tests should have a `contract-test` directory at the root directory of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if root of their package or something would be less potentially confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point - I clarified it a bit further by putting the path to the node server contract tests.
Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>


This is a refactor to move the contract tests to the server-node package.
SDK-1807
Additional changes:
package.jsonNote
Low Risk
Primarily a repo-structure/CI wiring refactor; risk is limited to contract-test execution and TypeScript build/reference correctness rather than runtime SDK behavior.
Overview
Moves the Node Server SDK contract test service into
packages/sdk/server-node/contract-testsand registers it as a Yarn workspace, including updating its dependency on@launchdarkly/node-server-sdkto useworkspace:^.Updates the server-node GitHub Actions workflow to build/start the contract-test service via workspace scripts and to reference suppression files from the new location; removes the old root-level contract test scripts and
contract-testsworkspace entry, and rewires TypeScript project references/excluderules to the newtsconfig.ref.jsonpath. Documentation is updated to describe contract tests in a package-scoped way and point to the new directory.Written by Cursor Bugbot for commit 843a0be. This will update automatically on new commits. Configure here.