-
Notifications
You must be signed in to change notification settings - Fork 1
fix: resolve CI test failures in spec and objectql packages #1145
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -430,8 +430,12 @@ describe('defineStack', () => { | |||||||||||||||||||||
| const result = defineStack(config); | ||||||||||||||||||||||
| // Default is now strict=true, so result is validated and is a different object reference | ||||||||||||||||||||||
| expect(result).not.toBe(config); // Validation creates new object | ||||||||||||||||||||||
| expect(result).toEqual(config); // But content is the same | ||||||||||||||||||||||
| // Validation may add defaults like defaultDatasource | ||||||||||||||||||||||
| expect(result.manifest).toBeDefined(); | ||||||||||||||||||||||
| expect(result.manifest.id).toBe(baseManifest.id); | ||||||||||||||||||||||
| expect(result.manifest.name).toBe(baseManifest.name); | ||||||||||||||||||||||
| expect(result.manifest.version).toBe(baseManifest.version); | ||||||||||||||||||||||
| expect(result.manifest.type).toBe(baseManifest.type); | ||||||||||||||||||||||
|
Comment on lines
+433
to
+438
|
||||||||||||||||||||||
| // Validation may add defaults like defaultDatasource | |
| expect(result.manifest).toBeDefined(); | |
| expect(result.manifest.id).toBe(baseManifest.id); | |
| expect(result.manifest.name).toBe(baseManifest.name); | |
| expect(result.manifest.version).toBe(baseManifest.version); | |
| expect(result.manifest.type).toBe(baseManifest.type); | |
| // Validation preserves the provided structure while applying schema defaults | |
| expect(result).toMatchObject(config); | |
| expect(result.manifest).toBeDefined(); | |
| expect(result.manifest.defaultDatasource).toBe('default'); |
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.
These datasource-mapping tests don’t currently verify which driver was selected (both mock drivers return the same shape), so the assertions will pass even if routing is broken. Consider asserting on
memoryDriver.create/tursoDriver.createcall counts (and ensure the registered object definition includes whatever fields the routing logic matches on, e.g.namespace, so the namespace rule can actually trigger).