Comparing version 5.0.6 to 5.0.7
@@ -10,8 +10,8 @@ const fs = require('fs'); | ||
function createFile(dir, content) { | ||
fs.writeFileSync(dir, content, (err) => { | ||
if(err) { | ||
try { | ||
fs.writeFileSync(dir, content); | ||
console.log(`A file was created in "${dir}" `); | ||
} catch(err){ | ||
return err; | ||
} | ||
console.log(`A file was created in "${dir}" `); | ||
}); | ||
} | ||
@@ -38,3 +38,1 @@ | ||
} | ||
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"bin": { | ||
@@ -10,0 +10,0 @@ "detox": "local-cli/detox.js" |
@@ -39,2 +39,4 @@ # detox | ||
You can also go through this [`short guide`](https://medium.com/@bogomolnyelad/how-to-test-your-react-native-app-like-a-real-user-ecfc72e9b6bc) | ||
If you used previous detox version, follow the [migration guide](../MIGRATION.md). | ||
@@ -106,3 +108,8 @@ | ||
#### Step 3: Create your first test (using mocha test runner) | ||
Automatically: | ||
<br> | ||
```sh | ||
detox init | ||
``` | ||
Manually: <br> | ||
* Create an `e2e` folder in your project root. | ||
@@ -165,3 +172,3 @@ * Create `mocha.opts` file with this [content](examples/demo-react-native/e2e/mocha.opts). | ||
For other cases there is a variaty of options: | ||
For other cases there is a variety of options: | ||
```js | ||
@@ -375,3 +382,3 @@ // find an element by id (add a 'testID' prop to your view for this to work) | ||
### Faster test runs with app reuse | ||
By default the app is rmoved, reinstalled and launched before each run. | ||
By default the app is removed, reinstalled and launched before each run. | ||
Starting fresh is critical in CI but in dev you might be able to save time between test runs and reuse the app that was previously installed in the simulator. To do so use the `reuse` flag and run your tests like this:`detox test --reuse`. | ||
@@ -378,0 +385,0 @@ This is especially useful with React Native DEV mode when making Javascript code changes that are getting picked up by the packager (and thus no reinstall is needed). This can save up to 7 seconds per run! |
Sorry, the diff of this file is not supported yet
422
16214279
701
21602