| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d847093 commit ce2f4e3
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2590,6 +2590,17 @@ | |||
| 2590 | 2590 | "return": { | |
| 2591 | 2591 | "ownedByThis": true | |
| 2592 | 2592 | } | |
| 2593 | + }, | ||
| 2594 | + "git_tree_entry_to_object": { | ||
| 2595 | + "args": { | ||
| 2596 | + "object_out": { | ||
| 2597 | + "isReturn": true | ||
| 2598 | + } | ||
| 2599 | + }, | ||
| 2600 | + "return": { | ||
| 2601 | + "isErrorCode": true | ||
| 2602 | + }, | ||
| 2603 | + "isAsync": true | ||
| 2593 | 2604 | } | |
| 2594 | 2605 | } | |
| 2595 | 2606 | }, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -156,6 +156,28 @@ describe("TreeEntry", function() { | |||
| 156 | 156 | }); | |
| 157 | 157 | }); | |
| 158 | 158 | ||
| 159 | + it("can convert entry into a blob", function() { | ||
| 160 | + var repo = this.repository; | ||
| 161 | + return this.commit.getEntry("README.md") | ||
| 162 | + .then(function(entry) { | ||
| 163 | + return entry.toObject(repo); | ||
| 164 | + }) | ||
| 165 | + .then(function(object) { | ||
| 166 | + assert.equal(object.isBlob(), true); | ||
| 167 | + }); | ||
| 168 | + }); | ||
| 169 | + | ||
| 170 | + it("can convert entry into a tree", function() { | ||
| 171 | + var repo = this.repository; | ||
| 172 | + return this.commit.getEntry("example") | ||
| 173 | + .then(function(entry) { | ||
| 174 | + return entry.toObject(repo); | ||
| 175 | + }) | ||
| 176 | + .then(function(object) { | ||
| 177 | + assert.equal(object.isTree(), true); | ||
| 178 | + }); | ||
| 179 | + }); | ||
| 180 | + | ||
| 159 | 181 | it("does not leak", function() { | |
| 160 | 182 | var test = this; | |
| 161 | 183 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments