Skip to content

test: sync sn-plugin-lib jest mock with actual usage - #55

Merged
gorlix merged 1 commit into
mainfrom
test/sync-plugin-lib-mock
Sep 1, 2026
Merged

test: sync sn-plugin-lib jest mock with actual usage#55
gorlix merged 1 commit into
mainfrom
test/sync-plugin-lib-mock

Conversation

@gorlix

@gorlix gorlix commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Found while auditing the codebase for other 0.1.65-related breakage (static pass over every sn-plugin-lib call site, cross-checked against the SDK diff and the actual permission-gate incident from #53):

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

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>
@gorlix
gorlix merged commit c5a7db3 into main Sep 1, 2026
4 checks passed
@gorlix
gorlix deleted the test/sync-plugin-lib-mock branch September 1, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant