#!/usr/bin/env node
(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", "../lib/executors/Node", "@dojo/shim/global", "../lib/node/util", "../lib/common/util"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Node_1 = require("../lib/executors/Node");
    var global_1 = require("@dojo/shim/global");
    var util_1 = require("../lib/node/util");
    var util_2 = require("../lib/common/util");
    var intern;
    util_1.getConfig().then(function (config) {
        if (config.showConfigs) {
            console.log(util_2.getConfigDescription(config));
        }
        else {
            intern = global_1.default.intern = new Node_1.default();
            intern.configure({ reporters: 'runner' });
            intern.configure(config);
            return intern.run();
        }
    }).catch(function (error) {
        // If intern wasn't initialized, then this error won't have been reported
        if (intern == null) {
            console.error(error);
        }
        global_1.default.process.exitCode = 1;
    });
});
//# sourceMappingURL=intern.js.map