grunt-plugin-buster

2.0.0 • Public • Published

grunt-plugin-buster Build Status

Run BusterJS tests

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install grunt-plugin-buster --save-dev

Once that's done, add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-plugin-buster');

If the plugin has been installed correctly, running grunt --help at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a devDependency, which ensures that it will be installed whenever the npm install command is run.

Buster task

Run this task with the grunt buster command.

This task starts a BusterJS server and a PhantomJS instance (if browser tests), runs all specified tests, and the shuts down the PhantomJS instance and BusterJS server (if they were started).

Options

config

Type: string Default: test/buster.js

This option sets the BusterJS configuration file to use when running tests. This is the equivalent to using the -c/--config option with the buster-test cli.

port

Type: number Default: 1111

This option sets the BusterJS server port to use when running browser tests. This is the equivalent to using the --port option with the buster-server cli and the -s/--server option with the buster-test cli.

reporter

Type: string Default: dots

This option sets the BusterJS test output reporter to use when running tests. This is the equivalent to using the -r/--reporter option with the buster-test cli.

Usage Examples

Typical

For typical usage, simply defining the name of config group is all that is required:

buster: {
    app: {}
}

Non-standard

If the project being tested is non-standard, configuration would look like the following:

buster: {
    app: {},
    options: {
        config: 'test/another.buster.js',
        groups: ['alpha-group', 'bravo-group'],
        port: 2222,
        reporter: 'specification'
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-plugin-buster

Weekly Downloads

1

Version

2.0.0

License

none

Last publish

Collaborators

  • nebhale