Skip to content

Commit

Permalink
react-testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
lugithub committed May 21, 2019
1 parent fc3e496 commit 52cb196
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 12 deletions.
3 changes: 3 additions & 0 deletions __mocks__/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
get: jest.fn(() => Promise.resolve({ data: {} }))
};
164 changes: 153 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@types/node": "12.0.2",
"@types/react": "16.8.17",
"@types/react-dom": "16.8.4",
"axios": "^0.18.0",
"query-string": "^6.5.0",
"ramda": "^0.26.1",
"react": "^16.8.6",
Expand Down Expand Up @@ -37,10 +38,13 @@
]
},
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/enzyme": "^3.9.2",
"@types/ramda": "^0.26.8",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.13.0",
"react-test-renderer": "^16.8.6"
"jest-dom": "^3.2.2",
"react-test-renderer": "^16.8.6",
"react-testing-library": "^7.0.1"
}
}
Loading

1 comment on commit 52cb196

@lugithub
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: An update to Fetch inside a test was not wrapped in act(...).

  When testing, code that causes React state updates should be wrapped into act(...):

testing-library/react-testing-library#281

wait react-dom@16.9.0

Please sign in to comment.