Skip to content

Commit

Permalink
Add a unit test for preventScroll option
Browse files Browse the repository at this point in the history
Enact-DCO-1.0-Signed-off-by: Seungcheon Baek (sc.baek@lge.com)
  • Loading branch information
0x64 committed Sep 24, 2024
1 parent 3662e69 commit fd77b00
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/spotlight/src/tests/spotlight-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ describe('Spotlight', () => {
expect(fn).toBeCalled();
}
));

test('should pass preventScroll option', testScenario(
scenarios.complexTree,
(root) => {
const fn = mockFocus(root.querySelector('[data-spotlight-id="s1"]'));
Spotlight.focus('s1', {preventScroll: true});

expect(fn).toHaveBeenCalledWith({preventScroll: true});
}
));
});

describe('#move', () => {
Expand Down

0 comments on commit fd77b00

Please sign in to comment.