Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions test/tests/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ describe("Commit", function() {
assert.equal(this.commit.message(), "Update README.md");
});

it("has a raw message", function() {
assert.equal(this.commit.messageRaw(), "Update README.md");
});

it("has a message encoding", function() {
var encoding = this.commit.messageEncoding();
assert.ok(encoding === "UTF-8" || encoding === undefined);
});

it("has a summary", function() {
assert.equal(this.commit.summary(), "Update README.md");
});

it("has a sha", function() {
assert.equal(this.commit.sha(), oid);
});
Expand Down Expand Up @@ -150,6 +163,11 @@ describe("Commit", function() {
});
});

it("has owner", function() {
var owner = this.commit.owner();
assert.ok(owner instanceof Repository);
});

it("can walk its repository's history", function(done) {
var historyCount = 0;
var expectedHistoryCount = 364;
Expand Down Expand Up @@ -197,6 +215,10 @@ describe("Commit", function() {
});
});

it("has a parent count", function() {
assert.equal(1, this.commit.parentcount());
});

it("can retrieve and walk a commit tree", function() {
var commitTreeEntryCount = 0;
var expectedCommitTreeEntryCount = 198;
Expand Down