0.1.3 • Published 7 years ago

gulp-test-rigging v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

gulp-test-rigging

MIT License

Simple Node.js library to simplify generating reports on unit tests, code-coverage, and code styling locally and in files consumable by Jenkins. Uses mocha, istanbul, and xo.

Install

npm install --save gulp-test-rigging

Usage

To use the module, simply require it in your gulpfile.js after "gulp" and pass "gulp" as a parameter.

var gulp = require('gulp');
require('gulp-test-rigging')(gulp);

gulp.task('default', ['validate']);

This adds the following tasks to your gulpfile:

  • run-lint - Runs xo on your source files and prints results to the console.
  • run-lint-jenkins - Runs xo on your source files and outputs the results to a file.
  • run-tests - Runs mocha and istanbul, printing results to the console.
  • run-tests-jenkins - Runs mocha and istanbul, outputting the results for each to files.
  • validate - Runs both "run-lint" and "run-tests".
  • validate-jenkins - Runs both "run-lint-jenkins" and "run-tests-jenkins".
  • watch-lint - Runs "run-lint" as a Gulp watch task.
  • watch-tests - Runs "run-tests" as a Gulp watch task.
  • watch-validate - Runs "validate" as a Gulp watch task.

Options

Options may be passed to the module following the "gulp" parameter in the require statement. The following lists the available options and their default values:

{
	paths: {
		src: ['app.js'],
		test: ['test/**/*spec.js', 'test/**/*test.js']
	},
	lintReporter: 'checkstyle',
	lintOutputDir: './lint-results',
	lintOutputFile: 'results.xml',
	testOutputDir: './test-results',
	testOutputFile: 'results.xml',
	coverageReporter: 'mocha-jenkins-reporter',
	coverageOutputFormat: ['cobertura']
}

License

Licensed under the MIT license.

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago