Skip to content

Commit ece04b0

Browse files
authored
Merge pull request #19 from IntrepidPursuits/drf-switch-over-to-jest-and-react-15-latest
Switch over to jest and React 15.5.4
2 parents 7aedd82 + 78baa67 commit ece04b0

43 files changed

Lines changed: 1824 additions & 1528 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ as well if you are missing them.
6969
```
7070
$ npm install --save-dev enzyme
7171
$ npm install --save-dev react-dom
72-
$ npm install --save-dev react-addons-test-utils
72+
$ npm install --save-dev react-test-renderer
7373
```
7474

7575
If you are new to testing in React, check out the following guides to get you up and running:
7676

77-
* [Set up with Jest in Create React App](docs/faq/installation-jest.md)
77+
* [Set up with Jest in Create React App (Recommended)](docs/faq/installation-jest.md)
7878
* [Set up Karma with Mocha and Chai in Create React App](docs/faq/installation-karma-mocha-chai.md)
7979
* [Set up Karma with Jasmine in Create React App](docs/faq/installation-karma-jasmine.md)
8080

docs/faq/installation-jest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Install [Create React App](https://github.com/facebookincubator/create-react-app)
66

77
```
8-
$ npm install -g create-react-app@1.0.3
8+
$ npm install -g create-react-app@1.3.1
99
```
1010

1111
2. Create a new React application
@@ -15,10 +15,10 @@
1515
$ cd my-app
1616
```
1717

18-
3. Install `react-page-object`, `enzyme`, and `react-addons-test-utils`
18+
3. Install `react-page-object`, `enzyme`, and `react-test-renderer`
1919

2020
```
21-
$ npm i -D react-page-object enzyme@2.7.0 react-addons-test-utils@15.4.1
21+
$ npm i -D react-page-object enzyme@2.8.2 react-test-renderer@15.5.4
2222
```
2323

2424
4. Modify the contents of `src/App.test.js` to be:

docs/faq/installation-karma-jasmine.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Install [Create React App](https://github.com/facebookincubator/create-react-app)
66

77
```
8-
$ npm install -g create-react-app@1.0.3
8+
$ npm install -g create-react-app@1.3.1
99
```
1010

1111
2. Create a new React application and eject from it
@@ -31,10 +31,10 @@
3131
$ npm i -D jasmine-core@2.5.2 karma-jasmine@1.1.0
3232
```
3333

34-
5. Install `react-page-object`, `enzyme`, and `react-addons-test-utils`
34+
5. Install `react-page-object`, `enzyme`, and `react-test-renderer`
3535

3636
```
37-
$ npm i -D react-page-object enzyme@2.7.0 react-addons-test-utils@15.4.1
37+
$ npm i -D react-page-object enzyme@2.8.2 react-test-renderer@15.5.4
3838
```
3939

4040
6. Modify your `package.json` `scripts` to be

docs/faq/installation-karma-mocha-chai.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Install [Create React App](https://github.com/facebookincubator/create-react-app)
66

77
```
8-
$ npm install -g create-react-app@1.0.3
8+
$ npm install -g create-react-app@1.3.1
99
```
1010

1111
2. Create a new React application and eject from it
@@ -31,10 +31,10 @@
3131
$ npm i -D chai@3.5.0 mocha@3.2.0 karma-chai@0.1.0 karma-mocha@1.3.0
3232
```
3333

34-
5. Install `react-page-object`, `enzyme`, and `react-addons-test-utils`
34+
5. Install `react-page-object`, `enzyme`, and `react-test-renderer`
3535

3636
```
37-
$ npm i -D react-page-object enzyme@2.7.0 react-addons-test-utils@15.4.1
37+
$ npm i -D react-page-object enzyme@2.8.2 react-test-renderer@15.5.4
3838
```
3939

4040
6. Modify your `package.json` `scripts` to be

karma.conf.js

Lines changed: 0 additions & 87 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Page from 'react-page-object'
2+
import Page from '../index'
33

44
describe('blurFocusedElementSpec', () => {
55
let page
@@ -24,6 +24,7 @@ describe('blurFocusedElementSpec', () => {
2424
window.spyOn(fakeWrapper, 'simulate')
2525
page.blurFocusedElement()
2626
expect(fakeWrapper.simulate).toHaveBeenCalledWith('blur')
27+
expect(true).toBe(true)
2728
})
2829

2930
it('should set focusedWrapper to null', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Page from 'react-page-object'
2+
import Page from '../index'
33

44
describe('checkSpec', () => {
55
let onBlur, onChange, onFocus, page, secondOnChange
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Page from 'react-page-object'
2+
import Page from '../index'
33

44
describe('chooseSpec', () => {
55
let onBlur, onChange, onFocus, page, secondOnChange
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Page from 'react-page-object'
2+
import Page from '../index'
33

44
describe('clickButtonSpec', () => {
55
let onBlur, onClick, onFocus, page
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Page from 'react-page-object'
2+
import Page from '../index'
33

44
describe('clickInputSpec', () => {
55
let onBlur, onClick, onFocus, page

0 commit comments

Comments
 (0)