mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Change the clean up to use rimraf.sync because the async was throwing errors
This commit is contained in:
@@ -16,7 +16,6 @@ describe('package', function () {
|
||||
var savedConfigShorthandResolver = config.shorthand_resolver;
|
||||
|
||||
function clean(done) {
|
||||
var del = 0;
|
||||
|
||||
// Restore possibly dirtied config.json
|
||||
config.json = savedConfigJson;
|
||||
@@ -24,15 +23,11 @@ describe('package', function () {
|
||||
// Restore possibly dirtied config.shorthand_resolver
|
||||
config.shorthand_resolver = savedConfigShorthandResolver;
|
||||
|
||||
rimraf(config.directory, function (err) {
|
||||
if (err) throw new Error('Unable to remove components directory');
|
||||
if (++del >= 2) done();
|
||||
});
|
||||
rimraf.sync(config.directory);
|
||||
|
||||
rimraf(config.cache, function (err) {
|
||||
if (err) throw new Error('Unable to remove cache directory');
|
||||
if (++del >= 2) done();
|
||||
});
|
||||
rimraf.sync(config.cache);
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
beforeEach(clean);
|
||||
|
||||
Reference in New Issue
Block a user