Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Session.vim
.LSOverride

# Icon must end with two \r
Icon
Icon


# Thumbnails
._*
Expand Down Expand Up @@ -111,3 +112,7 @@ dist/
release/
*.zip
*.tar.gz

# Editor files
*.sublime-*
.idea/
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ env:
- secure: MZFbO2Zbh5rW7yv5fTdofmxBxbzd5RH7jDOzWQZqQAA56YVgGS/uLeHRYIDeLCvl4xmG8Pqnyuqo4/uvXttE6KYeBsg88Uzip/jbEJw2tPbrnToXA4T1xdzrSTnN4Q4ahw7Un4eUdFYh8l9PXKv0V1NfopLNQKjXWOwAWj2XCrVDT5zq1BFBBxEEADPa5d0NjVLwRNA5DIowfL0SoJWcWiQDYPW0YF81Jrt2Stq5Ogdhpbq+Egi7vDhqoGGkijdMEP895gJDbXzMhiu3QG4Or0iUX2bwrAAY+/he9xF4Q46C3eSGMOcT7KBtDdJSGORDT3/KK3ZzwY4zf8RKPTWB2Q31x6E0mW6Zx5AukrYWakOot4/tqNE8S0JLMsMAYQcefPANcz5U9gce+4fGISuLgOtyA3qx0Gcy/zNz1nPrmJka03VMMw/5Mf71wJQkXwDUSYVBnAQXu2YDz3oZnAyB5WF1Xpxo1kEOeYa7ykLntT2KXuOVIHRZQQsCY2Jt1MzwdgoLey2F8KvRJv+4A96j9gSk66V/w2mOP+Ty5fR5HnwHWNBR7uZhjsPje9PHpqt20d6PA9AUsQEAhSdSZPvhdQys9lV1WT91z2TwQivItB8MOf9l7Ozf8Esk5GPVVe3edJAKT0SXyXqsYNNbYxpKfxhM3CV/wQcj9vd2W8AEbRM=
node_js:
- '6'
- '7'
- '8'
- '10'
- '11'
script: yarn run test
after_success:
- test ${TRAVIS_TAG} && yarn run build
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Target article's selector. If this prop is not specified, `document.body` will b

Root element selector. If this prop is not specified, `window` will be used.

### `hideNoAndFullProgress={ Boolean }`

If this is set to true, the progress bar will be hidden if
the progress is at 0 or max progress.

## License

Expand Down
9 changes: 6 additions & 3 deletions __test__/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import test from 'ava'
import React from 'react'
import { shallow, mount, render } from 'enzyme'
import Enzyme, { shallow, mount, render } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import ReadingProgress from '../src/js/lib'

import browserEnv from 'browser-env'
browserEnv()

Enzyme.configure({ adapter: new Adapter() })

test('renders expected HTML tag', (t) => {
const component = shallow(
<ReadingProgress targetEl="js-article" className="test-class" />
).dive().dive()
)

t.is(component.type(), 'progress')
t.is(component.render()['0'].name, 'progress')
t.true(component.hasClass('test-class'))
})
Loading