client/src/__tests__/App.test.js
author ymh <ymh.work@gmail.com>
Wed, 31 May 2017 18:08:22 +0200
changeset 8 6f572b6b6be3
parent 3 3b5d37d84cfe
child 168 ea92f4fe783d
permissions -rw-r--r--
try to make tests work again
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import React from 'react';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import ReactDOM from 'react-dom';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
import {Provider} from 'react-redux';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
import App from '../App';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
import configureStore from '../store/configureStore';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
8
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
     8
beforeAll(() => {
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
     9
  window.getSelection = () => {
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    10
    return {
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    11
      removeAllRanges: () => {}
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    12
    };
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    13
  };
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    14
});
6f572b6b6be3 try to make tests work again
ymh <ymh.work@gmail.com>
parents: 3
diff changeset
    15
3
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
const store = configureStore();
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
it('renders without crashing', () => {
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
  const div = document.createElement('div');
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
  ReactDOM.render(
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    <Provider store={store}>
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
      <App />
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    </Provider>,
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    div);
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
});