Commit a71d97c 1 parent 113493a commit a71d97c Copy full SHA for a71d97c
File tree 2 files changed +9
-1
lines changed
generate/templates/templates
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ var _ = require ( "lodash" ) ;
1
2
var promisify = require ( "promisify-node" ) ;
2
3
var rawApi ;
3
4
@@ -15,6 +16,12 @@ catch (ex) {
15
16
rawApi = require ( "../build/Debug/nodegit.node" ) ;
16
17
}
17
18
19
+ // For disccussion on why `cloneDeep` is required, see:
20
+ // https://github.com/facebook/jest/issues/3552
21
+ // https://github.com/facebook/jest/issues/3550
22
+ // https://github.com/nodejs/node/issues/5016
23
+ rawApi = _ . cloneDeep ( rawApi ) ;
24
+
18
25
// Native methods do not return an identifiable function, so we
19
26
// have to override them here
20
27
/* jshint ignore:start */
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ var NodeGit = require("../");
2
2
var Revwalk = NodeGit . Revwalk ;
3
3
4
4
Object . defineProperty ( Revwalk . prototype , "repo" , {
5
- get : function ( ) { return this . repository ( ) ; }
5
+ get : function ( ) { return this . repository ( ) ; } ,
6
+ configurable : true
6
7
} ) ;
7
8
8
9
var _sorting = Revwalk . prototype . sorting ;
You can’t perform that action at this time.
0 commit comments