Skip to content

Commit

Permalink
updating test
Browse files Browse the repository at this point in the history
  • Loading branch information
dpitcock committed Feb 5, 2025
1 parent bfd79ac commit 11fc1a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/container/__tests__/sticky-header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ beforeEach(() => {
describe.each(['embedded', 'full-page', 'cards', 'default', 'stacked'] as Array<
ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards'
>)('useStickyHeader with variant %s', variant => {
test('should set isStuck properly when rootTop is less than headerTop', () => {
test('should set isStuck to true when rootTop is less than headerTop', () => {
const rootRef = {
current: document.createElement('div'),
};
Expand All @@ -41,7 +41,7 @@ describe.each(['embedded', 'full-page', 'cards', 'default', 'stacked'] as Array<
window.dispatchEvent(new Event('scroll'));
});

expect(result.current.isStuck).toBe(variant === 'full-page');
expect(result.current.isStuck).toBe(true);
});

test('should set isStuck to false when rootTop is larger than than headerTop', () => {
Expand Down

0 comments on commit 11fc1a8

Please sign in to comment.