Skip to content

some up-to-date changes (bump to 0.2.0) #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates and bugfixes, bump to 0.2.0
^ react, babel, etc
- .babelrc
- jquery
! bugfix to snap the scroll area
! most test are fixed (except one)
* syntax
  • Loading branch information
majioa committed Mar 25, 2020
commit 90d34e0b5cb8fa6978b9ac611733ee844441e311
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ node_modules

# Optional npm cache directory
.npm
*~
*.sw*
yarn.lock
.cache

# Optional REPL history
.node_repl_history
9 changes: 4 additions & 5 deletions __tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ jest.unmock('../src/index.jsx')

import React from 'react'
import ReactDOM from 'react-dom'
import jQuery from 'jquery'

import TestUtils from 'react-dom/test-utils'
import ReactScrollPagination from '../src/index.jsx'
Expand Down Expand Up @@ -34,13 +33,13 @@ describe('ReactScrollPagination', () => {
expect(mockConsoleError.calls.count()).toEqual(1)
})

it('Should not display the pagination div if only props "fetchFunc" presented', () => {
it('Should not display the pagination div when no "totalPages" provided', () => {
const reactScrollPagination = TestUtils.renderIntoDocument(
<ReactScrollPagination fetchFunc={fetchFunc} />
)
const reactScrollPaginationNode = ReactDOM.findDOMNode(reactScrollPagination)
expect(reactScrollPaginationNode).toEqual(null)
expect(mockConsoleWarn.calls.count()).toEqual(0)
expect(mockConsoleWarn.calls.count()).toEqual(1)
})

describe('Test the props "paginationShowTime" ', () => {
Expand All @@ -66,7 +65,7 @@ describe('ReactScrollPagination', () => {

describe('Test the props "excludeElement" ', () => {
beforeEach(() => {
document.body.innerHTML = '<nav id="navbar" style="height:70px" > navbar1 </nav>'
document.body.innerHTML = '<div id="navbar" style="height:70px;" > navbar1 </div>'
})

it('Should take default value if the props is not presented ', ()=> {
Expand Down Expand Up @@ -192,4 +191,4 @@ describe('ReactScrollPagination', () => {
})
})

})
})
Loading