This repository was archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 151
Rewrite for RN 0.50+ #151
Merged
Merged
Rewrite for RN 0.50+ #151
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
16df641
Update to RN 0.49
513d44a
Fix BackAndroid and add BackHandler
84cb37b
Remove `Navigator` test as it was removed from RN
d8e6869
Fix Dimensions test
43c045a
Fix tests for Android progress bar and NativeModules Dimensions
f005766
Update for RN 0.50
4256a3d
Package updates
4fcf080
Automatic lint fixes
a15c31e
Manual lint fixes
e7b2d15
Fix test broken by chai upgrade
36f18ea
More package updates
014cde7
Update travis to test RN 0.49+
6aa7840
Remove react-addons-test-utils from travis builds
f1b2f25
Use RN 0.50+
9d8ff3b
Add tests for Node 8 now that it's LTS
669d461
Add back devDeps for RN and react to fix build
ad2ced5
Fix CI to not rely on devDeps react and react-native
9d48815
Drop support for Node 4
e70acd5
Node support
e4b98c6
Set base Node 8 test version to 8.9.1
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,16 @@ | ||
| language: node_js | ||
| node_js: | ||
| - "4.0.0" | ||
| - "6.0.0" | ||
| - "4" | ||
| - "6" | ||
| - "8" | ||
|
|
||
|
|
||
| # values taken from react-native's package.json | ||
| env: | ||
| - REACT_NATIVE_VERSION=0.38 REACT_VERSION=15.4.0 | ||
| - REACT_NATIVE_VERSION=0.39 REACT_VERSION=15.4.0-rc.4 | ||
| - REACT_NATIVE_VERSION=0.40 REACT_VERSION=15.4.1 | ||
| - REACT_NATIVE_VERSION=0.41 REACT_VERSION=15.4.0 | ||
| - REACT_NATIVE_VERSION=0.42 REACT_VERSION=15.4.1 | ||
| - REACT_NATIVE_VERSION=0.43 REACT_VERSION=16.0.0-alpha.6 | ||
| - REACT_NATIVE_VERSION=0.50 REACT_VERSION=16.0.0 | ||
|
|
||
| before_install: | ||
| - npm install react@~$REACT_VERSION react-dom@~$REACT_VERSION react-native@~$REACT_NATIVE_VERSION | ||
|
|
||
| before_script: | ||
| - npm uninstall react-native react react-dom react-addons-test-utils | ||
| - npm install react@~$REACT_VERSION react-dom@~$REACT_VERSION react-addons-test-utils@~$REACT_VERSION react-native@~$REACT_NATIVE_VERSION | ||
| - npm run build-haste | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,11 @@ | ||
| import { expect } from 'chai'; | ||
| import sinon from 'sinon'; | ||
|
|
||
| describe('BackAndroid', () => { | ||
| const { BackAndroid } = require('react-native'); | ||
|
|
||
| it('should bind events', function () { | ||
| expect(BackAndroid.addEventListener).to.be.a('function'); | ||
| expect(BackAndroid.addEventListener().remove).to.be.a('function'); | ||
| expect(BackAndroid.removeEventListener).to.be.a('function'); | ||
| expect(BackAndroid.exitApp).to.be.a('function'); | ||
| }); | ||
|
|
||
| it('should remove', function () { | ||
| sinon.stub(BackAndroid, 'removeEventListener'); | ||
| BackAndroid.addEventListener().remove(); | ||
| expect(BackAndroid.removeEventListener).to.have.been.calledOnce; | ||
| BackAndroid.removeEventListener.restore(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { expect } from 'chai'; | ||
|
|
||
| describe('BackHandler', () => { | ||
| const { BackHandler } = require('react-native'); | ||
|
|
||
| it('should bind events', function () { | ||
| expect(BackHandler.addEventListener).to.be.a('function'); | ||
| expect(BackHandler.removeEventListener).to.be.a('function'); | ||
| expect(BackHandler.exitApp).to.be.a('function'); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we keep the base versions here too, so add
8.0.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use
8.9.1as that is the LTS version?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
8specifically targets the latest release at build time, which is fine. I quite like the idea of testing against the base version as well