Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit b2327fa

Browse files
committed
write some tests and fix CI test fails
1 parent ea9d035 commit b2327fa

File tree

6 files changed

+32
-10
lines changed

6 files changed

+32
-10
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ node_js:
77
- 8
88
install:
99
- yarn install
10+
- yarn install react prop-types
1011
script:
1112
# - npm run lint
1213
- yarn test

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"name": "react-github-buttons",
33
"version": "0.4.0",
44
"description": "React Components for dynamic buttons for github repo's star, fork etc.",
5-
"keywords": ["react", "github", "component", "utility"],
5+
"keywords": [
6+
"react",
7+
"github",
8+
"component",
9+
"utility"
10+
],
611
"author": {
712
"email": "vaibhav.hrt@gmail.com",
813
"name": "Vaibhav Vishal",
@@ -41,6 +46,7 @@
4146
"devDependencies": {
4247
"@svgr/rollup": "^4.3.0",
4348
"@types/jest": "^24.0.14",
49+
"@types/prop-types": "^15.7.1",
4450
"@types/react": "^16.3.13",
4551
"@types/react-dom": "^16.0.5",
4652
"babel-core": "^6.26.3",

src/__tests__/index.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Fork, Sponsor, Star, UsedBy, Watch } from "../index";
2+
3+
describe(">>> Exports required components", () => {
4+
it("+++ Fork is truthy", () => {
5+
expect(Fork).toBeTruthy();
6+
});
7+
8+
it("+++ Sponsor is truthy", () => {
9+
expect(Sponsor).toBeTruthy();
10+
});
11+
12+
it("+++ Star is truthy", () => {
13+
expect(Star).toBeTruthy();
14+
});
15+
16+
it("+++ UsedBy is truthy", () => {
17+
expect(UsedBy).toBeTruthy();
18+
});
19+
20+
it("+++ Watch is truthy", () => {
21+
expect(Watch).toBeTruthy();
22+
});
23+
});

src/star.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export default class Star extends React.Component<IPropTypes, IState> {
3636
}
3737

3838
render() {
39-
// const { owner, repo } = this.props;
4039
const { stargazers_count } = this.state;
4140
return <GithubButton variant="star" count={stargazers_count} { ...this.props } />;
4241
}

src/test.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)