Skip to content

Commit 4839ee4

Browse files
author
John Haley
committed
Fixed tag list and added a test for it
1 parent 1d9c17a commit 4839ee4

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

generate/input/descriptor.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,19 @@
12211221
"git_tag_foreach": {
12221222
"ignore": true
12231223
},
1224+
"git_tag_list": {
1225+
"args": {
1226+
"tag_names": {
1227+
"isReturn": true,
1228+
"shouldAlloc": true,
1229+
"cppClassName": "Array",
1230+
"jsClassName": "Array",
1231+
"size": "count",
1232+
"key": "strings"
1233+
}
1234+
},
1235+
"isAsync": true
1236+
},
12241237
"git_tag_target": {
12251238
"args": {
12261239
"target_out": {

test/tests/tag.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ describe("Tag", function() {
55
var reposPath = path.resolve("test/repos/workdir/.git");
66

77
var Repository = require("../../lib/repository");
8+
var Tag = require("../../lib/tag");
89
var Obj = require("../../lib/object");
910
var Oid = require("../../lib/oid");
1011

@@ -60,4 +61,14 @@ describe("Tag", function() {
6061
testTag(tag);
6162
});
6263
});
64+
65+
it("can list tags in a repo", function() {
66+
return Tag.list(this.repo).then(function(tagNames) {
67+
tagNames = tagNames.filter(function(tagNameTest) {
68+
return tagNameTest == tagName;
69+
});
70+
71+
assert.equal(tagNames.length, 1);
72+
});
73+
});
6374
});

0 commit comments

Comments
 (0)