All Projects → jonkemp → gulp-qunit

jonkemp / gulp-qunit

Licence: MIT license
Run QUnit unit tests in a headless PhantomJS instance.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gulp-qunit

Gulp Debug
Debug Vinyl file streams to see what files are run through your Gulp pipeline
Stars: ✭ 223 (+829.17%)
Mutual labels:  gulp-plugin
gulp-myth
[DEPRECATED] Myth - Postprocessor that polyfills CSS
Stars: ✭ 39 (+62.5%)
Mutual labels:  gulp-plugin
qunit-phantomjs-runner
A PhantomJS-powered headless test runner for QUnit
Stars: ✭ 69 (+187.5%)
Mutual labels:  qunit
Gulp Strip Debug
Strip console, alert, and debugger statements from JavaScript code
Stars: ✭ 242 (+908.33%)
Mutual labels:  gulp-plugin
gulp-sort
Sort files in stream by path or any custom sort comparator
Stars: ✭ 22 (-8.33%)
Mutual labels:  gulp-plugin
ember-cli-qunit
QUnit testing package for ember-cli applications
Stars: ✭ 29 (+20.83%)
Mutual labels:  qunit
Gulp Webp
Convert images to WebP
Stars: ✭ 187 (+679.17%)
Mutual labels:  gulp-plugin
gulp-merge-json
A gulp plugin to merge JSON & JSON5 files into one file
Stars: ✭ 35 (+45.83%)
Mutual labels:  gulp-plugin
gulp-cssbeautify
Reindent and reformat CSS
Stars: ✭ 18 (-25%)
Mutual labels:  gulp-plugin
gulp-es6-transpiler
[DEPRECATED] Transpile ES2015 to ES5
Stars: ✭ 47 (+95.83%)
Mutual labels:  gulp-plugin
gulp-upload-qcloud
腾讯云 cos 静态资源上传 gulp 插件
Stars: ✭ 18 (-25%)
Mutual labels:  gulp-plugin
gulp-xo
Validate files with XO
Stars: ✭ 37 (+54.17%)
Mutual labels:  gulp-plugin
gulp-sitemap
Generate a search engine friendly sitemap.xml using a Gulp stream
Stars: ✭ 60 (+150%)
Mutual labels:  gulp-plugin
Gulp Size
Display the size of your project
Stars: ✭ 225 (+837.5%)
Mutual labels:  gulp-plugin
ember-qunit-assert-helpers
An ember-addon that provides additional QUnit 2.0 assertions specific to Ember.js.
Stars: ✭ 12 (-50%)
Mutual labels:  qunit
Gulp Html Replace
Replace build blocks in HTML. Like useref but done right.
Stars: ✭ 222 (+825%)
Mutual labels:  gulp-plugin
gulp-cleanhtml
remove unneeded whitespaces, line-breaks, comments, etc from the HTML.
Stars: ✭ 19 (-20.83%)
Mutual labels:  gulp-plugin
gulp-ava
Run AVA tests
Stars: ✭ 56 (+133.33%)
Mutual labels:  gulp-plugin
gulp-rework
Preprocess CSS with Rework
Stars: ✭ 30 (+25%)
Mutual labels:  gulp-plugin
gulp-html
Gulp plugin for HTML validation, using the official Nu Html Checker (v.Nu)
Stars: ✭ 70 (+191.67%)
Mutual labels:  gulp-plugin

gulp-qunit Build Status Coverage Status

NPM

Run QUnit unit tests in a headless PhantomJS instance.

Run QUnit unit tests in a PhantomJS-powered headless test runner, providing basic console output for QUnit tests. Uses the phantomjs node module and the PhantomJS Runner QUnit Plugin.

Inspired by the grunt plugin grunt-contrib-qunit.

Install

Install with npm

$ npm install --save-dev gulp-qunit

Usage

var gulp = require('gulp'),
    qunit = require('gulp-qunit');

gulp.task('test', function() {
    return gulp.src('./qunit/test-runner.html')
        .pipe(qunit());
});

With options:

var gulp = require('gulp'),
    qunit = require('gulp-qunit');

gulp.task('test', function() {
    return gulp.src('./qunit/test-runner.html')
        .pipe(qunit({'phantomjs-options': ['--ssl-protocol=any']}));
});

With page options:

var gulp = require('gulp'),
    qunit = require('gulp-qunit');

gulp.task('test', function() {
    return gulp.src('./qunit/test-runner.html')
        .pipe(qunit({'page': {
            viewportSize: { width: 1280, height: 800 }
        }}));
});

You no longer need this plugin to run QUnit tests in your gulp tasks. Now you can do this with node-qunit-phantomjs, a stand alone module. It can also be used via command line, and it has an option for more verbose test reporting.

var gulp = require('gulp'),
    qunit = require('node-qunit-phantomjs');

gulp.task('test', function() {
    qunit('./qunit/test-runner.html');
});

With phantomjs2:

var gulp = require('gulp'),
    qunit = require('gulp-qunit');

gulp.task('test', function() {
    return gulp.src('./qunit/test-runner.html')
        .pipe(qunit({'binPath': require('phantomjs2').path}));
});

API

qunit(options)

options.timeout

Type: Number
Default: 5

Pass a number or string value to override the default timeout of 5 seconds.

options.phantomjs-options

Type: Array
Default: None

These options are passed on to PhantomJS. See the PhantomJS documentation for more information.

options.page

Type: Object
Default: None

These options are passed on to PhantomJS. See the PhantomJS documentation for more information.

options.binPath

Type: String Default: require("phantomjs").path

The option is used to execute phantomjs binary path

options.runner

Type: String Default: require.resolve('qunit-phantomjs-runner')

This option is used to configure the test runner used to control phantomjs

License

MIT © Jonathan Kemp

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].