Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Commit

Permalink
fix hooks and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Nov 8, 2018
1 parent 60bbec6 commit 15ec31d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
linters: {
'**/*.+(js|json|less|css|ts|tsx|md)': [
'prettier',
'npm run test -- --findRelatedTests',
'npm run test -- --coverage --findRelatedTests',
'git add',
],
},
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"validate": "cross-env CI=true npm-run-all --parallel test build"
},
"husky": {
"pre-commit": "lint-staged && npm run validate -s"
"hooks": {
"pre-commit": "lint-staged && npm run validate -s"
}
},
"eslintConfig": {
"extends": "react-app"
Expand Down
2 changes: 1 addition & 1 deletion src/screens/user/components/fetch/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Fetch from '../'
beforeEach(() => {
jest.spyOn(window, 'fetch')
window.fetch.mockImplementation(getUrl =>
Promise.resolve({json: () => Promise.resolve({data: {getUrl}})}),
Promise.resolve({json: () => Promise.resolve({getUrl})}),
)
})

Expand Down

0 comments on commit 15ec31d

Please sign in to comment.