Skip to content

Commit

Permalink
Adding jest and sample tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Oct 2, 2017
1 parent 60fdb65 commit 98abb8c
Show file tree
Hide file tree
Showing 7 changed files with 839 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules
*.log
server.dist.js
coverage
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ cache: yarn

script:
- npm run lint:check
- npm run test -- --coverage

after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rumors-site

[![Build Status](https://travis-ci.org/cofacts/rumors-site.svg?branch=master)](https://travis-ci.org/cofacts/rumors-site)
[![Build Status](https://travis-ci.org/cofacts/rumors-site.svg?branch=master)](https://travis-ci.org/cofacts/rumors-site) [![Coverage Status](https://coveralls.io/repos/github/cofacts/rumors-site/badge.svg?branch=master)](https://coveralls.io/github/cofacts/rumors-site?branch=master)

Rumors list / creation UI, with server-side rendering

Expand Down
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
roots: [
'<rootDir>/components',
'<rootDir>/pages',
'<rootDir>/redux',
'<rootDir>/util',
],
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dev": "babel-node server",
"lint": "eslint --fix .",
"lint:check": "eslint .",
"test": "jest .",
"build": "docker build -t mrorz/rumors-site:latest .",
"build:next": "next build",
"build:server": "babel server.js -o server.dist.js",
Expand All @@ -24,6 +25,7 @@
"babel-plugin-transform-css-import-to-string": "^0.0.2",
"babel-plugin-transform-inline-environment-variables": "^0.1.1",
"babel-runtime": "^6.25.0",
"coveralls": "^3.0.0",
"glob": "^7.1.2",
"immutable": "^3.8.1",
"isomorphic-fetch": "^2.2.1",
Expand Down Expand Up @@ -60,6 +62,7 @@
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.1.0",
"jest": "^21.2.1",
"prettier": "^1.4.4",
"redux-devtools-extension": "^2.13.2"
}
Expand Down
5 changes: 5 additions & 0 deletions util/__tests__/reducer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('reducer', () => {
describe('commonSetState', () => {
it('sets state from payload');
});
});
Loading

0 comments on commit 98abb8c

Please sign in to comment.