-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from prashaantt/wip
Wip
- Loading branch information
Showing
17 changed files
with
556 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Change Log | ||
All notable changes to the "node-tdd" extension will be documented in this file. | ||
|
||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. | ||
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [Unreleased] | ||
- Initial release | ||
## 0.1.0 | ||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,52 @@ | ||
# node-tdd README | ||
# node-tdd | ||
|
||
This is the README for your extension "node-tdd". After writing up a brief description, we recommend including the following sections. | ||
> A [Visual Studio Code](http://code.visualstudio.com/) extension to ease [test-driven development](https://en.wikipedia.org/wiki/Test-driven_development) in Node/JavaScript | ||
## Features | ||
|
||
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. | ||
 | ||
|
||
For example if there is an image subfolder under your extension project workspace: | ||
- Activates when a workspace containing `package.json` is opened. | ||
- Triggers an automatic test build whenever source files are updated. | ||
- Shows a colour-coded build summary. | ||
- Shows the average test coverage (experimental). | ||
|
||
\!\[feature X\]\(images/feature-x.png\) | ||
|
||
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. | ||
## Requirements | ||
|
||
If you have any requirements or dependencies, add a section describing those and how to install and configure them. | ||
|
||
## Extension Settings | ||
|
||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. | ||
|
||
For example: | ||
## Settings | ||
|
||
This extension contributes the following settings: | ||
|
||
* `myExtension.enable`: enable/disable this extension | ||
* `myExtension.thing`: set to `blah` to do something | ||
|
||
## Known Issues | ||
|
||
Calling out known issues can help limit users opening duplicate issues against your extension. | ||
|
||
## Release Notes | ||
|
||
Users appreciate release notes as you update your extension. | ||
|
||
### 1.0.0 | ||
|
||
Initial release of ... | ||
|
||
### 1.0.1 | ||
|
||
Fixed issue #. | ||
|
||
### 1.1.0 | ||
| Setting | Type | Default | Description | | ||
| --------------------------- | -------------- | --------------------------------- | --------------------------------------------------------------- | | ||
| `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}` | Glob pattern for files to watch, relative to the workspace root | | ||
| `nodeTdd.runOnActivation` | boolean | `false` | Run tests as soon as TDD mode gets (re-)activated | | ||
| `nodeTdd.verbose` | boolean | `false` | Show (more intrusive) build status dialogs | | ||
| `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 threshold percentage, used to colour-code the coverage | | ||
|
||
Added features X, Y, and Z. | ||
## Commands | ||
|
||
----------------------------------------------------------------------------------------------------------- | ||
The following commands are available from the commands menu as well as convenience status bar buttons: | ||
|
||
## Working with Markdown | ||
| Command | Action | | ||
| -------------- | ------------------------------------- | | ||
| `activate` | Activate `node-tdd` in a workspace | | ||
| `deactivate` | De-activate `node-tdd` in a workspace | | ||
| `toggleOutput` | Toggle detailed test results output | | ||
| `stopBuild` | Stop a running build | | ||
|
||
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: | ||
## Limitations and known issues | ||
|
||
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux) | ||
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux) | ||
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets | ||
- 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, only tested with [Lab](https://github.com/hapijs/lab) and [Istanbul](https://github.com/gotwarlost/istanbul). Disable it if 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. :/ | ||
|
||
### For more information | ||
Suggestions and PRs are welcome. | ||
|
||
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) | ||
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) | ||
## License | ||
|
||
**Enjoy!** | ||
MIT License. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
{ | ||
"name": "node-tdd", | ||
"version": "0.1.0", | ||
"displayName": "Node TDD", | ||
"description": "A simple TDD extension for Node.", | ||
"version": "0.1.0", | ||
"description": "A Visual Studio Code extension to ease test-driven development in Node/JavaScript", | ||
"main": "./out/src/extension", | ||
"repository": "https://github.com/prashaantt/node-tdd.git", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/prashaantt/node-tdd.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/prashaantt/node-tdd/issues" | ||
}, | ||
"author": "Prashant Tiwari <[email protected]>", | ||
"publisher": "prashaantt", | ||
"license": "MIT", | ||
"engines": { | ||
"vscode": "^1.8.0" | ||
}, | ||
"icon": "images/emojione-rocket.png", | ||
"galleryBanner": { | ||
"color": "#607d8b" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
|
@@ -22,12 +32,14 @@ | |
"@types/mocha": "^2.2.37", | ||
"@types/node": "^7.0.0", | ||
"mocha": "^3.2.0", | ||
"tslint": "^4.3.1", | ||
"typescript": "^2.1.5", | ||
"vscode": "^1.0.3" | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "tsc -p ./", | ||
"compile": "tsc -watch -p ./", | ||
"lint": "tslint -c tslint.json './{src,test}/**/*.ts'", | ||
"postinstall": "node ./node_modules/vscode/bin/install", | ||
"test": "node ./node_modules/vscode/bin/test" | ||
}, | ||
|
@@ -72,7 +84,7 @@ | |
"default": false | ||
}, | ||
"nodeTdd.testScript": { | ||
"description": "The npm script to run (if other than `test`)", | ||
"description": "The npm script to run tests", | ||
"type": "string", | ||
"default": "test" | ||
}, | ||
|
@@ -92,12 +104,12 @@ | |
"default": false | ||
}, | ||
"nodeTdd.showCoverage": { | ||
"description": "Show the test coverage if available (experimental)", | ||
"description": "Show the test coverage if reported (experimental)", | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"nodeTdd.coverageThreshold": { | ||
"description": "The coverage threshold (if applicable)", | ||
"description": "The coverage threshold", | ||
"type": [ | ||
"number", | ||
"null" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.