Skip to content

Commit 4536256

Browse files
author
Rajat Sancheti
committed
Runs prettier
1 parent 9379608 commit 4536256

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/__tests__/index.test.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ describe('React Infinite Scroll Component', () => {
8686
describe('When missing the dataLength prop', () => {
8787
it('throws an error', () => {
8888
console.error = jest.fn();
89-
const props = { loader: 'Loading...', hasMore: false, next: (() => {}) }
89+
const props = { loader: 'Loading...', hasMore: false, next: () => {} };
9090

9191
// @ts-ignore
92-
expect(() => render(<InfiniteScroll {...props} />)).toThrow(Error)
92+
expect(() => render(<InfiniteScroll {...props} />)).toThrow(Error);
9393
// @ts-ignore
94-
expect(console.error.mock.calls[0][0]).toContain('"dataLength" is missing')
94+
expect(console.error.mock.calls[0][0]).toContain(
95+
'"dataLength" is missing'
96+
);
9597
});
96-
})
98+
});
9799

98100
describe('When user scrolls to the bottom', () => {
99101
it('does not show loader if hasMore is false', () => {

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export default class InfiniteScroll extends Component<Props, State> {
6969
if (typeof this.props.dataLength === 'undefined') {
7070
throw new Error(
7171
`mandatory prop "dataLength" is missing. The prop is needed` +
72-
` when loading more content. Check README.md for usage`
73-
)
72+
` when loading more content. Check README.md for usage`
73+
);
7474
}
7575

7676
this._scrollableNode = this.getScrollableTarget();

0 commit comments

Comments
 (0)