Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
prashaantt committed Jan 23, 2017
1 parent aec2bb3 commit 206c622
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ All notable changes to `node-tdd` will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.2.0] - 2017-01-23
### Added
- `minimal` setting to declutter the status bar.
- `reporter` setting to parse [TAP](https://testanything.org/producers.html#javascript) outputs.

### Removed
- The deprecated `runOnActivation` setting.

## [0.1.1] - 2017-01-17
### Changed
- Deprecated the `runOnActivation` setting in favour of `buildOnActivation` for better consistency in config names. `runOnActivation` will be removed in the next release.
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
- Triggers an automatic test build whenever source files are updated.
- Shows a colour-coded build summary.
- Shows the average test coverage (experimental).
- Optionally, if your test runner generates [TAP output](https://testanything.org/producers.html#javascript), use the `nodeTdd.reporter` [setting](#settings) to provide a more meaningful test summary:

![tap](images/tap.png)

- Finally, use `nodeTdd.minimal` to reclaim some status bar real estate:

![minimal mode](images/minimal.png)

## Settings

Expand All @@ -19,17 +26,19 @@ This extension contributes the following settings:
| --------------------------- | -------------- | --------------------------------- | ------------------------------------------------------------------- |
| `nodeTdd.activateOnStartup` | boolean | `true` | Activate TDD mode when workspace is opened |
| `nodeTdd.testScript` | string | `test` | The npm script to run tests |
| `nodeTdd.glob` | string | `{test,src}/**/*.{js,ts,jsx,tsx}` | The glob pattern for files to watch, relative to the workspace root |
| `nodeTdd.verbose` | boolean | `false` | Show (more intrusive) build status dialogs |
| `nodeTdd.glob` | string | `{src,test}/**/*.{js,ts,jsx,tsx}` | The glob pattern for files to watch, relative to the workspace root |
| `nodeTdd.verbose` | boolean | `false` | Show build status dialogs |
| `nodeTdd.minimal` | boolean | `false` | Minimise status bar clutter |
| `nodeTdd.buildOnActivation` | boolean | `false` | Run tests when TDD mode is activated |
| `nodeTdd.buildOnCreate` | boolean | `false` | Run tests when matching files are created |
| `nodeTdd.buildOnDelete` | boolean | `false` | Run tests when matching files are deleted |
| `nodeTdd.showCoverage` | boolean | `false` | Show the average test coverage if reported (experimental) |
| `nodeTdd.coverageThreshold` | number / null | `null` | The coverage threshold percentage, used to colour-code the coverage |
| `nodeTdd.reporter` | string / null | `null` | The test reporter used (currently only "tap" is supported) |

## Commands

The following commands are available from the commands menu as well as convenience status bar buttons:
The following commands are available from the commands menu as well as status bar buttons:

| Command | Action |
| -------------- | ------------------------------------- |
Expand All @@ -42,14 +51,14 @@ The following commands are available from the commands menu as well as convenien

- The extension doesn't get activated if `package.json` was not initially present when the workspace was opened; a window restart will be required to detect a change.
- It doesn't work with watch mode/incremental test builds. The build process used for running tests must exit on each execution, otherwise it will never report the status.
- `showCoverage` is an experimental setting that currently only works with the text-summary reports from [Lab](https://github.com/hapijs/lab) and [Istanbul](https://github.com/gotwarlost/istanbul). Disable it if it doesn't work for you or its output looks funny.
- `showCoverage` is an experimental setting that currently only works with the text-summary reports from [Lab](https://github.com/hapijs/lab), [Istanbul](https://github.com/gotwarlost/istanbul) and [nyc](https://github.com/istanbuljs/nyc). Disable it if it doesn't work for you or its output looks funny.
- Ironically for a TDD extension, it has very few tests of its own because I don't yet know how to test UI elements in VS Code. :/

Suggestions and PRs are welcome.
Suggestions and PRs are [welcome](https://github.com/prashaantt/node-tdd/issues).

## Release notes

See the [change log](CHANGELOG.md).
See the [change log](CHANGELOG.md). If you are reading this from within VS Code, click on the Changelog tab of the extension preview page.

## License

Expand Down
Binary file added images/minimal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"nodeTdd.glob": {
"description": "The glob pattern for files to watch, relative to the workspace root",
"type": "string",
"default": "{test,src}/**/*.{js,ts,jsx,tsx}"
"default": "{src,test}/**/*.{js,ts,jsx,tsx}"
},
"nodeTdd.reporter": {
"description": "The test reporter used",
Expand Down

0 comments on commit 206c622

Please sign in to comment.