gq

grunt-qunitnode

A Grunt task plugin to execute QUnit tests in Node.js.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

4

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

2

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

grunt-qunitnode Build Status: Linux

A Grunt task plugin to execute QUnit tests in Node.js.

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-qunitnode --save-dev

Using

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks( 'grunt-qunitnode' );

grunt.initConfig({
    qunitnode: {
        src: [ "test/mylib_test_a.js", "test/mylib_test_b.js" ]
    }
});

Source/Test Files

You should call your test files here. As in Node you can require the files to be tested in your test files, it's not necessary to load those via grunt. Otherwise, simply add them first.

This next example calls the source file that will be tested as well:

grunt.initConfig({
    qunitnode: {
        all: [ "src/mymodule.js", "test/mymodule.js" ]
    }
});

Globbing Patterns a.k.a. Wildcards

This plugin support Grunt Globbing Patterns, as seen in the example below:

// Project configuration.
grunt.initConfig({
    qunitnode: {
        all: [ "test/**/*.js" ]
    }
});

Node QUnit task

Run this task with the grunt qunitnode command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

force

Type: boolean Default: false

When true, the whole task will not fail when there are individual test failures, or when no assertions for a test have run. This can be set to true when you always want other tasks in the queue to be executed.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial