-
-
Notifications
You must be signed in to change notification settings - Fork 153
Conversation
- update enzyme and use enzyme's react 16 adapter - add RN and react devDeps for now (reflects the peerDeps) - Add newly required `reactNativeVersion` and `DeviceInfo` properties to the `NativeModules` - `reactNativeVersion` reads from the RN source - `DeviceInfo` is set to iPhone 6
- BackAndroid is deprecated by BackHandler - added test for BackHandler - Remove obsolete test of `addEventListener().remove()`
- backwards compatible changes for RN 0.50 - RN 0.50 adds attributes to components and breaks the buildComponentHTML approach to testing
- TODO lint fixes
- remove unnecessary assertion because it's asserted implicitly in the next assertion
Signed-off-by: Jason Ma <jason@peartherapeutics.com>
- render of `ProgressBarAndroid` changed from `ActivityIndicator` in RN 0.49 back to `AndroidProgressBar` in RN 0.50 Signed-off-by: Jason Ma <jason@peartherapeutics.com>
Changing to support RN 0.50+ because the |
Signed-off-by: Jason Ma <jason@peartherapeutics.com>
Signed-off-by: Jason Ma <jason@peartherapeutics.com>
Signed-off-by: Jason Ma <jason@peartherapeutics.com>
Signed-off-by: Jason Ma <jason@peartherapeutics.com>
Dropping support for Node 4. https://travis-ci.org/RealOrangeOne/react-native-mock/jobs/297785954 |
Should probably add |
Initial skim looks good. Would probably be ideal to update the |
Looking forward to this @RealOrangeOne and @jasonfma. When I try to pull this branch as a dev dependency for my project running RN 0.50 and React 16 it complains when running haste.js as part of the post install
If I clone the project on a different folder the post-install finishes as expected |
Adding a mock for FlatList would be a great idea, in my opinion. |
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.
Overall looks pretty good, a couple small comments. Amazing work! 🎉
.travis.yml
Outdated
- "6" | ||
- "8" |
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.0
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.
Should we use 8.9.1
as 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 8
specifically targets the latest release at build time, which is fine. I quite like the idea of testing against the base version as well
@@ -14,7 +14,7 @@ import { expect } from 'chai'; | |||
describe('Easing', () => { | |||
const { Easing } = require('react-native'); | |||
|
|||
it('should have all functions', function () { | |||
it('should have all functions', () => { |
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.
Please revert changes like this back. function
is correct here
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.
Arrow functions should be just fine. You're using them above on line 14 already. Is there something I'm missing?
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.
Sorry, this change was part of the eslint rule update. I just wholesale applied the rule fixes. I can revert, but do you have more context as to why this one needs to be function?
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.
I assumed all were using function
, in that case this is totally fine
@RealOrangeOne just to be clear, this is a PR into the |
- Update readme to reference Node 6 support - Update travis to include Node 8.0.0 tests
@RealOrangeOne Looks like node 8.0.0 is broken. I'm going to set to 8.9.1 since it's the first LTS version. |
Just seen the build log, agreed that's very weird. I think sticking to that version will probably be fine, it's early enough! |
@RealOrangeOne can you rebuild? I think it failed because of https://github.com/npm/registry/issues/255 |
I think this is set up this way so the build can test with various versions of each. I did add them as @RealOrangeOne comments addressed |
@RealOrangeOne will you have some time soon to take a look? I'm happy to help here where I can too. This PR is to merge into your existing |
All these changes look good to me! Let's get this into |
I tried rewrite branch but I get this error
Will we use this branch as master ? |
If you're downloading straight from GitHub, you'll have to build the compiled code to actually use it. Yes, this code will eventually be pushed into master. Time frame unknown, but shouldn't be too long! |
I get it via yarn, but build folder isn't present. |
Yarn, npm, makes no difference. We don't commit the |
I'm agree with you but I'm not sure to understand. |
hmm, this sounds odd, and probably not the best place to discuss. Perhaps raise an actual issue so it can be looked into properly |
done #157 |
Major upgrade that supports 0.50+
reactNativeVersion
andDeviceInfo
properties to theNativeModules
Navigator
test as it was removed from RNBackAndroid
and addBackHandler
testsNOTE: This is a PR into the existing
rewrite
branch