FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed tag list and added a test for it by johnhaley81 · Pull Request #300 · nodegit/nodegit · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .json  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 13 additions & 0 deletions generate/input/descriptor.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,19 @@
"git_tag_foreach": {
"ignore": true
},
"git_tag_list": {
"args": {
"tag_names": {
"isReturn": true,
"shouldAlloc": true,
"cppClassName": "Array",
"jsClassName": "Array",
"size": "count",
"key": "strings"
}
},
"isAsync": true
},
"git_tag_target": {
"args": {
"target_out": {
Expand Down
11 changes: 11 additions & 0 deletions test/tests/tag.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe("Tag", function() {
var reposPath = path.resolve("test/repos/workdir/.git");

var Repository = require("../../lib/repository");
var Tag = require("../../lib/tag");
var Obj = require("../../lib/object");
var Oid = require("../../lib/oid");

Expand Down Expand Up @@ -60,4 +61,14 @@ describe("Tag", function() {
testTag(tag);
});
});

it("can list tags in a repo", function() {
return Tag.list(this.repo).then(function(tagNames) {
tagNames = tagNames.filter(function(tagNameTest) {
return tagNameTest == tagName;
});

assert.equal(tagNames.length, 1);
});
});
});

Back | FazBrowse Home | New Git URL