Merge pull request #25 from autopulated/restore-readme-commit

Add documentation for code coverage configuration
This commit is contained in:
James Crosby 2016-01-26 17:09:28 +00:00
commit 30f8b97d35
1 changed files with 39 additions and 0 deletions

View File

@ -11,3 +11,42 @@ probably not succeed without target-specific startup code).
See [CHANGELOG.md](CHANGELOG.md) for the changes associated with
each version.
## Code Coverage
To enable code coverage for a specific module, add this config to the application's config.json:
```JSON
"debug" : {
"options" : {
"coverage" : {
"modules" : {
"<module name>" : true
}
}
}
}
```
For example, to add code coverage to the sockets module, use this config:
```JSON
"debug" : {
"options" : {
"coverage" : {
"modules" : {
"sockets" : true
}
}
}
}
```
If building tests, then this config can be passed on the command line via the ```--config``` option. For example,
```
yotta build --config testconfig.json
```
```
yotta build --config '"debug" : { "options" : { "coverage" : { "modules" : { "sockets" : true } } } }'
```