Add some more tests.

This commit is contained in:
André Cruz
2013-04-21 15:16:58 +01:00
parent ddbfc5c57a
commit 8bc7349635
2 changed files with 46 additions and 6 deletions

View File

@@ -145,7 +145,7 @@ Resolver.prototype._applyPkgMeta = function (meta) {
if (meta.ignore && meta.ignore.length) {
return Q.nfcall(glob, '**/*', { cwd: this._tempDir, dot: true, mark: true })
.then(function (files) {
var filter = this._createIgnoreFilter(meta.ignores),
var filter = this._createIgnoreFilter(meta.ignore),
promises = [];
// Foreach file that passes the ignore filter,
@@ -158,7 +158,10 @@ Resolver.prototype._applyPkgMeta = function (meta) {
// Wait for all the rimraf's to finish
return Q.all(promises);
}.bind(this));
}.bind(this))
.then(function () {
return meta;
});
}
return Q.resolve(meta);
@@ -169,7 +172,7 @@ Resolver.prototype._savePkgMeta = function (meta) {
return Q.nfcall(fs.writeFile, path.join(this._tempDir, '.bower.json'), contents)
.then(function () {
this._pkgMeta = meta;
return this._pkgMeta = meta;
}.bind(this));
};