intern.registerLoader(function (config) {
    var loaderConfig = config.loader.config || {};
    loaderConfig.baseUrl = loaderConfig.baseUrl || config.basePath;
    if (!('async' in loaderConfig)) {
        loaderConfig.async = true;
    }
    var globalObj = typeof window !== 'undefined' ? window : global;
    intern.log('Configuring loader with:', loaderConfig);
    globalObj.dojoConfig = loaderConfig;
    return intern.loadScript('node_modules/dojo/dojo.js').then(function () {
        intern.log('Loaded dojo loader');
        var loader = globalObj.require;
        intern.log('Using loader', loader);
        intern.log('Loading suites:', config.suites);
        var dfd = intern.createDeferred();
        loader(config.suites, function () { dfd.resolve(); });
        return dfd.promise;
    });
});
//# sourceMappingURL=dojo.js.map