Skip to content

Commit

Permalink
Added scripts:test:coverage task. (#79)
Browse files Browse the repository at this point in the history
* Added `scripts:test:coverage` task.

* Updated changelog.

* Bump package version.
  • Loading branch information
DamianMullins authored and ashleynolan committed Aug 18, 2017
1 parent 0f7f4be commit a0a42b6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

v5.3.0
------------------------------
*August 18, 2017*

### Added
- Added the `scripts:test:coverage` task.

v5.2.0
------------------------------
*August 18, 2017*
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ Runs the following tasks

Runs any unit tests found in the JavaScript source directory using Jest.

- #### `scripts:test:coverage`

Runs the JS unit tests and display a coverage report once complete.

- #### `clean:scripts`

Removes any JavaScript already in the dist directory.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justeat/gulp-build-fozzie",
"version": "5.2.0",
"version": "5.3.0",
"description": "Gulp build tasks for use across Fozzie modules",
"main": "index.js",
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)",
Expand Down
15 changes: 15 additions & 0 deletions tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ gulp.task('scripts:test', callback => {
});


/**
* `scripts:test:coverage` Task
* -------------
* Runs the JS unit tests and display a coverage report once complete.
*
*/
gulp.task('scripts:test:coverage', callback => {
jest.runCLI(
{ coverage: true },
[path.resolve(process.cwd())],
() => callback()
);
});


/**
* `scripts:bundle` Task
* -------------
Expand Down

0 comments on commit a0a42b6

Please sign in to comment.