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