function testExtension(name, config, entryPoint) {
        var result = new $.Deferred(),
            extensionPath = config.baseUrl + "/" + entryPoint + ".js";

        FileSystem.resolve(extensionPath, function (err, entry) {
            if (!err && entry.isFile) {
                // unit test file exists
                var extensionRequire = brackets.libRequire.config({
                    context: name,
                    baseUrl: config.baseUrl,
                    paths: $.extend({}, config.paths, globalPaths)
                });

                extensionRequire([entryPoint], function () {
                    result.resolve();
                });
            } else {
                result.reject();
            }
        });

        return result.promise();
    }
Runs unit tests for the extension that lives at baseUrl into its own Require.js context

@param {!string} name, used to identify the extension
@param {!{baseUrl: string}} config object with baseUrl property containing absolute path of extension
@param {!string} entryPoint, name of the main js file to load
@return {!$.Promise} A promise object that is resolved when all extensions complete loading.