Skip to content

Commit

Permalink
Minor changes to a comment and a test case description
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffon committed Aug 30, 2017
1 parent cd45e62 commit f45d360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export default class ListView extends React.Component<ListViewProps> {
const max = nodes.length;
for (let i = 0; i < max; i++) {
const node: HTMLElement = (nodes[i]: any);
// const itemKey = node.dataset.itemKey;
// use `.getAttribute(...)` instead of `.dataset` for jest / JSDOM
const itemKey = node.getAttribute('data-item-key');
if (!itemKey) {
// eslint-disable-next-line no-console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('<ListView>', () => {
windowAddListenerSpy.mockRestore();
});

it('adds the onScroll listener to the root HTML element after it mounts', () => {
it('adds the onScroll listener to the window element after the component mounts', () => {
expect(windowAddListenerSpy).toHaveBeenCalled();
expect(windowAddListenerSpy).toHaveBeenLastCalledWith('scroll', instance._onScroll);
});
Expand Down

0 comments on commit f45d360

Please sign in to comment.