Skip to content

Commit

Permalink
Merge pull request #2 from andrew09/develop
Browse files Browse the repository at this point in the history
Merge v1.1.0 into master
  • Loading branch information
Andrew Hillier committed Jul 26, 2018
2 parents 429163f + 90e5cd3 commit 420866a
Show file tree
Hide file tree
Showing 17 changed files with 3,498 additions and 1,254 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.cache
/.cache
/coverage
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.cache
node_modules
/src
/.eslintrc
/.gitignore
/.prettierrc
/jest-setup.js
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ OR

`npm install enzyme-get-wrapper -D`

`Enzyme` is also a required package for this to work. See installation guide here: http://airbnb.io/enzyme/docs/installation/index.html

## Configuration

In order to use Enzyme with modern versions of React, you need to install an adapter. That is outlined in the above installation guide. `enzyme-get-wrapper` needs to be configured with your version of Enzyme. Here is an example of a Jest test setup file:

```javascript
import enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

import { configure } from './enzyme-get-wrapper';

enzyme.configure({ adapter: new Adapter() });
configure(enzyme);
```

## Usage

```javascript
Expand Down
853 changes: 9 additions & 844 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import 'raf/polyfill';
import { configure } from 'enzyme';
import enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });
import { configure } from './src';

enzyme.configure({ adapter: new Adapter() });
configure(enzyme);

window.requestAnimationFrame = function(callback) {
setTimeout(callback, 0);
Expand Down
Loading

0 comments on commit 420866a

Please sign in to comment.