Skip to content

Commit

Permalink
[Add] intersection observer test용 모듈 추가 #32
Browse files Browse the repository at this point in the history
why
테스트환경은 브라우저이기 때문에 intersection api 가 없음

how
mock 모듈 추가로 테스트 통과하게 설정
  • Loading branch information
WooYeonSeo committed Nov 26, 2019
1 parent 7fc98dc commit c40c5e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"prettier": "^1.19.1"
"intersection-observer": "^0.7.0",
"prettier": "^1.19.1",
"react-intersection-observer": "^8.25.1"
},
"dependencies": {
"@apollo/react-components": "^3.1.3",
Expand Down
2 changes: 2 additions & 0 deletions client/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import ReactDOM from 'react-dom';
import App from './App';
import { ApolloProvider } from '@apollo/react-hooks';
import client from './apollo/ApolloClient';
import 'intersection-observer';
import 'react-intersection-observer';

it('renders without crashing', () => {
const div = document.createElement('div');
Expand Down

0 comments on commit c40c5e6

Please sign in to comment.