Skip to content

Commit be4fb7a

Browse files
committed
Sort test code properly
1 parent 94842cc commit be4fb7a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

__tests__/components/CodePreTag.test.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@ describe('<CodePreTag /> component', () => {
8484
// Initially the scroll position must be at the top
8585
expect($container.scrollTop).toBe(0);
8686

87-
$container.scrollTop = 100;
88-
8987
// Test that the scroll position is updated correctly
88+
$container.scrollTop = 100;
9089
expect($container.scrollTop).toBe(100);
9190

92-
container.setProps({ children: shortCodeToRender });
93-
9491
// Test that the scroll position is reset after changing its children
92+
container.setProps({ children: shortCodeToRender });
9593
expect($container.scrollTop).toBe(0);
9694
});
9795
});

0 commit comments

Comments
 (0)