-
Notifications
You must be signed in to change notification settings - Fork 0
Fix test data to match evolved schemas #137
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
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.
Pull request overview
This PR fixes test failures caused by schema updates in the ObjectStack spec package. The changes align test files with updated Zod schema definitions for sharing rules, plugin context, and driver interfaces.
Changes:
- Updated sharing rule tests to match the new discriminated union schema structure (owner vs criteria types, structured sharedWith/ownedBy objects, and 'condition' instead of 'criteria')
- Added missing 'drivers' field to all plugin context mock objects in tests
- Added missing 'findStream' and 'upsert' methods to all driver interface mock objects in tests
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/spec/src/permission/sharing.test.ts | Updated all test cases to align with the new SharingRuleSchema structure, including proper type restrictions ('owner', 'criteria'), level support ('full' added), structured sharedWith/ownedBy objects, and field renaming (criteria → condition) |
| packages/spec/src/kernel/plugin.test.ts | Added the drivers.register field to all plugin context mock objects to match the PluginContextSchema definition |
| packages/spec/src/driver/driver.test.ts | Added findStream and upsert methods to all driver interface mock objects to match the DriverInterfaceSchema definition |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…and test expectations Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Tests were failing because schemas evolved but test data wasn't updated. Three files affected:
sharing.test.ts
typefield and structuredsharedWithobjectdriver.test.ts
findStream,upsertplugin.test.ts
driversfield to all PluginContext mocksAll 64 tests in affected files now pass.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.