Skip to content
Prev Previous commit
Next Next commit
Fix null ref error in beforeEach
  • Loading branch information
John Haley committed Feb 26, 2015
commit 762fdf3a0519f8c3b24a739424309efb04572f91
10 changes: 6 additions & 4 deletions test/tests/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ describe("Clone", function() {
this.timeout(30000);

beforeEach(function() {
return fse.remove(this.clonePath).catch(function(err) {
console.log(err);
if (this.clonePath) {
return fse.remove(this.clonePath).catch(function(err) {
console.log(err);

throw err;
});
throw err;
});
}
});

afterEach(function(done) {
Expand Down