You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only the pure logic (computeLassoRect, pickInitialLanguage) is unit-tested. App.tsx (mount, tap handler, busy-guard reset, SDK orchestration) has no test. The sn-plugin-lib jest mock already exists (__mocks__/sn-plugin-lib.js).
Goal
A component/smoke test for App.tsx that mounts it with the mocked SDK and asserts the tap flow.
Approach
Render App with react-test-renderer (already a devDep) using the existing mock.
Simulate a press on the overlay; assert the mocked lassoElements → setLassoBoxState → closePluginView sequence is called with the expected rect.
Context
Only the pure logic (
computeLassoRect,pickInitialLanguage) is unit-tested.App.tsx(mount, tap handler, busy-guard reset, SDK orchestration) has no test. Thesn-plugin-libjest mock already exists (__mocks__/sn-plugin-lib.js).Goal
A component/smoke test for
App.tsxthat mounts it with the mocked SDK and asserts the tap flow.Approach
Appwithreact-test-renderer(already a devDep) using the existing mock.lassoElements→setLassoBoxState→closePluginViewsequence is called with the expected rect.Acceptance criteria
References
__mocks__/sn-plugin-lib.js,jest.config.js