(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "../../src/lib/executors/Node", "@dojo/shim/global"], factory);
    }
})(function (require, exports) {
    "use strict";
    var Node_1 = require("../../src/lib/executors/Node");
    var global_1 = require("@dojo/shim/global");
    return function (grunt) {
        grunt.registerMultiTask('intern', function () {
            var done = this.async();
            var config = this.options({});
            // Force colored output for istanbul report
            process.env.FORCE_COLOR = 'true';
            var intern = global_1.default.intern = new Node_1.default(config);
            intern.run().then(finish, finish);
            function finish(error) {
                // Remove the global intern object when we're done; this will allow Intern to be run again in the same
                // process
                global_1.default.intern = null;
                done(error);
            }
        });
    };
});
//# sourceMappingURL=intern.js.map