Repository navigation
feat: SDK update for version 27.0.0 - #332
Conversation
|
| ResponseType? responseType, | ||
| }) async { | ||
| return super.noSuchMethod( | ||
| Invocation.method(#call, [method]), |
There was a problem hiding this comment.
This mock records only the HTTP method and discards the path, parameters, and headers. The new tests then check only the model type returned from a stubbed response, so they would pass even if a DocumentsDB method used the wrong endpoint or omitted its inputs. The same pattern appears in the new VectorsDB and account tests. The repository requires tests of observable behavior rather than tests that mirror the implementation; assert the requests these methods promise before merging.
Context Used: Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/services/documents_db_test.dart
Line: 23
Comment:
**Tests hide request behavior**
This mock records only the HTTP method and discards the path, parameters, and headers. The new tests then check only the model type returned from a stubbed response, so they would pass even if a DocumentsDB method used the wrong endpoint or omitted its inputs. The same pattern appears in the new VectorsDB and account tests. The repository requires tests of observable behavior rather than tests that mirror the implementation; assert the requests these methods promise before merging.
**Context Used:** Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Not in this release: test/services/documents_db_test.dart is not in this PR's diff (last changed in 26.2.0). Every generated service test uses the same method-only mock, so this belongs in the generator's test templates rather than this release.
There was a problem hiding this comment.
You're right — this comment is out of scope for this PR because test/services/documents_db_test.dart is unchanged here. Since the method-only mock is shared by generated service tests, the durable fix belongs in the generator templates rather than this release. I'll withdraw this finding for PR #332.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
This PR contains updates to the SDK for version 27.0.0.
What's Changed
Account.listLogsand theLog,LogListmodelsClient.setDevKeyX-Appwrite-Response-Format: 2.3.0)Account.createIdTokenSessionfor native Apple and Google sign-in withIdTokenProviderenumAccount.createRecoveryOTPandAccount.updateRecoveryOTPfor code-based password recoveryAccount.createEmailVerificationOTPandAccount.updateEmailVerificationOTPkakaoandtiktokvalues toOAuthProviderpasswordPwnedfield onUserandproviderIdTokenfield onIdentity