test: sync sn-plugin-lib jest mock with actual usage - #55
Merged
Conversation
Found while auditing the codebase for other 0.1.65-related breakage: PluginCommAPI.getPageDisplaySize (added in the previous fix) had no mock entry — any future test importing App.tsx/sdk.ts would throw "getPageDisplaySize is not a function" instead of exercising the code. No current test does, so this was latent, not an active failure. Also drop the PluginFileAPI and PointUtils mock blocks: neither module is imported anywhere in src/, App.tsx, or index.js anymore (PluginFileAPI. getPageSize was the API replaced by getPageDisplaySize; PointUtils was never used by this plugin). Keeping unused mock surface around just invites it to silently drift from reality again. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while auditing the codebase for other 0.1.65-related breakage (static pass over every
sn-plugin-libcall site, cross-checked against the SDK diff and the actual permission-gate incident from #53):PluginCommAPI.getPageDisplaySize(added by fix(lasso): stop using PluginFileAPI.getPageSize, it's FILE:READ-gated now #53) had no mock entry — latent bug, any future test importingApp.tsx/sdk.tswould throw instead of running. No current test does, so nothing was actively failing.PluginFileAPI/PointUtilsmock blocks: neither module is imported anywhere insrc/,App.tsx, orindex.js—PluginFileAPI.getPageSizewas exactly the API fix(lasso): stop using PluginFileAPI.getPageSize, it's FILE:READ-gated now #53 replaced.No other API-diff-related bugs found — see the full audit summary in the PR thread / chat.
Test plan
npm run typecheck/lint/test:ci— all clean, 18/18 passing