Skip to content

Commit 762fdf3

Browse files
author
John Haley
committed
Fix null ref error in beforeEach
1 parent 9141d59 commit 762fdf3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/tests/clone.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ describe("Clone", function() {
1818
this.timeout(30000);
1919

2020
beforeEach(function() {
21-
return fse.remove(this.clonePath).catch(function(err) {
22-
console.log(err);
21+
if (this.clonePath) {
22+
return fse.remove(this.clonePath).catch(function(err) {
23+
console.log(err);
2324

24-
throw err;
25-
});
25+
throw err;
26+
});
27+
}
2628
});
2729

2830
afterEach(function(done) {

0 commit comments

Comments
 (0)