Skip to content

Instantly share code, notes, and snippets.

@mildavw
mildavw / gist:a20d3ef894e4faa4a06818a7a474974f
Last active May 25, 2018 14:55
React Native build for Native Starter Pro 8.1.0

git clone git@gitstrap.com:strapmobile/NativeStarterPro-FullApp.git

cd NativeStarterPro-FullApp/MobileApp/

yarn

yarn run eject

Select option: "React Native: I'd like a regular React Native project." Answer the questions that follow.

@mildavw
mildavw / gist:cadb39940fd06c19981f6f0586940214
Last active September 20, 2018 15:18
Are you losing sleep() over intermittent Capybara test failures? You should!

Used properly, the waiting strategy that certain Capybara matchers employ can solve most of those pesky intermittently failing full-stack/browser tests. Pretty much all of them† are due to race conditions between the processes running your tests, the app you're testing, and the browser (which includes both the rendering of the dom, your javascript running there, and if you're calling outside services, The Internet.) The race condition may resolve with 100% consistency on your local dev machine, but when your CI server runs the code, sometimes one process wins, sometimes another. The result is an intermittently failing test that you can only repro on a remote CI machine.

If your developent environment is significantly different than the CI environment, the barriers to effectively troubleshooting the problem may be too high. What I've seen a lot of developers do is just "punt" and insert a sleep(2) in their tests to increase the probabilty that the other processes finish first. And then write the test assumi