-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add create-react-app test #22
base: default
Are you sure you want to change the base?
Conversation
@Gozala Thank you for maintaining this helpful library with huge dedication! |
@Gozala I verified that it works on Android and iOS. No problem. I also investigated dependency conflict btw react-native and create-react-app tests just for my curiosity. The latest version of the react-native package has peerdep to react@17.0.1 (exact), and the latest of react itself is 17.0.2. |
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 think that your decision to isolate react native test is actually good and feel sorry for not having done it on my own.
I think it's possible that packages used by react-native and create-react-app are much different and have some conflicts because React Native uses its own bundler (metro) instead of such as webpack.
I don't understand what happens when installing react-native and create-react-app at the same time.
On your second point, I'm currently failing to reproduce it and encountering no babel/TS issues even when I delete all rm -rf ../../node_modules
.
In my environment npm install
from the test packages installs packages to their own directories' node_modules/
and doesn't affect other test packages' behaviours.
So can you share the package-lock.json
or other related information if you still can reproduce it?
I also want to suggest commiting package-lock.json
to enhance test reproducibility if you don't have particular reasons against it.
The CI job failure on windows can be fixed by replacing npm's --prefix
option with cd
to test directory.
A bug of npm@6 causes it and it's reported here: npm/cli#3887
This bug causes npm to install some files to wrong locations and these files caused test failure.
And last, I'm very sorry for not helping you 7 month ago.
I'm in autism spectrum and often have difficulty understanding intentions of others, especially when communication is not so straight.
I'm actually willing to help you, so feel free to mention me at next time when you encounter react native issues.
@@ -20,14 +20,15 @@ | |||
"scripts": { | |||
"test:node": "mocha test/test-*.spec.js", | |||
"test:browser": "playwright-test test/test-*.js", | |||
"test:react-native": "jest test/test-lib.react-native.spec.js", | |||
"test:react-native": "npm test --prefix test/react-native", |
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.
We can fix windows CI errors with this.
"test:react-native": "npm test --prefix test/react-native", | |
"test:react-native": "cd test/react-native && npm test", |
@@ -20,14 +20,15 @@ | |||
"scripts": { | |||
"test:node": "mocha test/test-*.spec.js", | |||
"test:browser": "playwright-test test/test-*.js", | |||
"test:react-native": "jest test/test-lib.react-native.spec.js", | |||
"test:react-native": "npm test --prefix test/react-native", | |||
"test:create-react-app": "npm test --prefix test/create-react-app", |
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.
same with the above suggestion.
"test:create-react-app": "npm test --prefix test/create-react-app", | |
"test:create-react-app": "cd test/create-react-app && npm test", |
Primary objective of this PR is:
Unfortunately this end up been huge time sink 😭. create-react-app, react-native etc... all bring various tools incompatible with each other or TS etc... All the other changes in this PR are duck tapes to work around those:
node_module/@types/babel*
stuff to appear that caused TS to fail. After hours of failed attempts to prevent those deps to appear and also failed attempts to get TS to ignore those I've gave up and addedrm -rf ../../node_modules
before test runs. Which seems to resolved the issues even if it's gross.@somay I think this still works with react-native, but if you have time to take a look it would be greatly appreciated.