We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb4c0bd commit 8dae43aCopy full SHA for 8dae43a
test/tests/tree.js
@@ -39,6 +39,24 @@ describe("Tree", function() {
39
}).done(done);
40
});
41
42
+ it("updates a tree", function () {
43
+ var repo = this.existingRepo;
44
+ var update = new NodeGit.TreeUpdate();
45
+ update.action = NodeGit.Tree.UPDATE.REMOVE;
46
+ update.path = "README.md";
47
+ return this.commit.getTree().then(function(tree) {
48
+ return tree.createUpdated(repo, 1, [update]);
49
+ })
50
+ .then(function(treeOid) {
51
+ return repo.getTree(treeOid);
52
53
+ .then(function(updatedTree) {
54
+ assert.throws(function () {
55
+ updatedTree.entryByName("README.md");
56
+ });
57
58
59
+
60
it("walks its entries and returns the same entries on both progress and end",
61
function() {
62
var repo = this.repository;
0 commit comments