Closed niftylettuce closed 8 years ago
I'm on the 0.12-hmr
These all happened after your rebase to master or whatever on this branch
+1 for some reason this just started happening for me with the 0.8.0 release, though it wasn't happening prior - leaving me believe it may possibly be a SemVer issue with the dependencies.
Quick update. Whatever I saw with 0.8.0
must've been on my side. Just did a clean react-native init
and installed react-native-webpack-server
along with the goods without issue.
Is there any way we can write tests? On Nov 5, 2015 1:21 PM, "Josh Habdas" notifications@github.com wrote:
Quick update. Whatever I saw with 0.8.0 must've been on my side. Just did a clean react-native init and installed react-native-webpack-server along with the goods without issue.
— Reply to this email directly or view it on GitHub https://github.com/mjohnston/react-native-webpack-server/issues/121#issuecomment-154143916 .
The TDD landscape in JS/Node feels kinda shaky right now, what with tools like Jest getting a lot of flack from the community and things like AVA popping up seemingly overnight. But for some inspiration from the React community check this out: https://github.com/HSLdevcom/digitransit-ui. It uses tried and true Node test frameworks I know work and also uses the novel concept of literate business tests.
As for testing toolchains, it'd be nice to have a reporter capable of automatically kicking off a test-runner anytime a dependency or deep dependency changes - though that could get kinda gnarly when, by comparison, the effort of running the tests could be crowdsourced so those using the toolchains directly.
Hm ava looks pretty cool. I don't have much time to set up a test framework right now, but I'd be happy to accept a PR :smile:
Right now we're just running rnws bundle
for the example projects on Travis, but we should have tests for:
rnws start
(with various combinations of options), fetch each bundle and map file and assert that they match their expected value.rnws bundle
(with various combinations of options) and assert that the correct bundles are written to their expected file path.We should probably also add to an example project: usage of 3rd-party RN module(s) like react-native-camera, and usage of static image assets.
As for dependency changes, greenkeeper could be useful. Thoughts?
Whoa! Good stuff. My only question is where does the sidewalk end? ^^
Back to the issue at hand, I was able to resolve my similar problem in the issue linked above. On Thu, Nov 5, 2015 at 1:10 PM Spencer Elliott notifications@github.com wrote:
Hm ava looks pretty cool. I don't have much time to set up a test framework right now, but I'd be happy to accept a PR [image: :smile:]
Right now we're just running rnws bundle for the example projects on Travis, but we should have tests for:
- getReactNativeExternals.js: make sure it returns the expected modules
- Launch rnws start (with various combinations of options), fetch each bundle and map file and assert that they match their expected value.
- Run rnws bundle (with various combinations of options) and assert that the correct bundles are written to their expected file path.
We should probably also add to an example project: usage of 3rd-party RN module(s) like react-native-camera https://github.com/lwansbrough/react-native-camera, and usage of static image assets.
As for dependency changes, greenkeeper http://greenkeeper.io/ could be useful. Thoughts?
— Reply to this email directly or view it on GitHub https://github.com/mjohnston/react-native-webpack-server/issues/121#issuecomment-154156978 .
Cool. Yeah, I think the most important thing is to make sure nothing breaks due to dependency changes, so greenkeeper could be a good solution for that.
I'll create some new issues for this test-related stuff :+1:
Users/nexus/Public/foobar/Foobar/node_modules/react-native-webpack-server/node_modules/bluebird/js/main/async.js:43 fn = function () { throw arg; }; ^
TypeError: file.match is not a function at getPlatformExtension (/Users/nexus/Public/foobar/Foobar/node_modules/react-native/packager/react-packager/src/lib/getPlatformExtension.js:21:22)
npm ERR! Darwin 14.5.0 npm ERR! argv "/Users/nexus/.nvm/versions/node/v4.1.2/bin/node" "/Users/nexus/.nvm/versions/node/v4.1.2/bin/npm" "run" "hot" npm ERR! node v4.1.2 npm ERR! npm v2.14.4 npm ERR! code ELIFECYCLE npm ERR! App@0.0.1 hot:
HOT=1 react-native-webpack-server start --hot
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the App@0.0.1 hot script 'HOT=1 react-native-webpack-server start --hot'. npm ERR! This is most likely a problem with the App package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! HOT=1 react-native-webpack-server start --hot npm ERR! You can get their info via: npm ERR! npm owner ls App npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: