0.0.6 • Published 7 years ago

grunt-gabarito v0.0.6

Weekly downloads
3
License
-
Repository
github
Last release
7 years ago

grunt-gabarito Build Status

Run gabarito test runner within grunt

TL;DR

Install dev dependencies.

npm install gabarito --save-dev
npm install grunt-gabarito --save-dev

Configure within Gruntfile.js

grunt.initConfig({
    gabarito: {
        src: ["test.js"]
    }
});

grunt.loadNpmTasks("grunt-gabarito");

Write test.

// test.js

var gabarito = require("gabarito");
var assert = gabarito.assert;

gabarito.add("test").
clause("should pass", function () {
    assert.isTrue(true);
}).

clause("should fail", function () {
    assert.isTrue(false);
});

Run.

grunt gabarito

Options

src

Type: String|Array

Test files. These files will be passed to the selected gabarito environment(s).

options.environments

Type: Array default: ["node"]

Your gabarito environments. Gabarito will issue the test files for each of the selected environments. This plugin comes bundled with "node" and "phantom" environments. For aditional configurations to be passed to the environment, the object format may be used.

E.g.:

grunt.initConfig({
    gabarito: {
        src: "test.js",
        environments: [
            "phantom",
            {
                type: "node",
                stack: "true"
            }
        ]
    }
});

options.reporters

Type: Array default: ["console"]

Gabarito reporters. Gabarito will tell the reporters what is going on with the tests themselves. This plugin comes bundled with "console" and "junit" reporters. For aditional configurations to be passed to the reporter, the object format may be used.

E.g.:

grunt.initConfig({
    gabarito: {
        src: "test.js",
        reporters: [
            "console",
            {
                type: "junit",
                file: "junit-results.xml",
                name: "Project X"
            }
        ]
    }
});

options.config

Type: String

JSON file to be used as configuration.

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.1-alpha.6

9 years ago

0.0.1-alpha.5

9 years ago

0.0.1-alpha.4

9 years ago

0.0.1-alpha.3

9 years ago

0.0.1-alpha.2

9 years ago

0.0.1-alpha.1

9 years ago