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

Added tests for commit by nkt · Pull Request #290 · nodegit/nodegit · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) All 1 file type 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
22 changes: 22 additions & 0 deletions test/tests/commit.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 @@ -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

Back | FazBrowse Home | New Git URL