Skip to content

Commit 75cbff0

Browse files
committed
Added a test for Diff.blobToBuffer
1 parent a0a1654 commit 75cbff0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/tests/diff.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,16 @@ describe("Diff", function() {
163163
null,
164164
null,
165165
null,
166-
function() {
167-
console.log("delta");
166+
function(delta, hunk, payload) {
167+
assert.equal(hunk.oldStart(), 1);
168+
assert.equal(hunk.oldLines(), 19);
169+
assert.equal(hunk.newStart(), 1);
170+
assert.equal(hunk.newLines(), 1);
171+
assert.equal(
172+
hunk.header().substring(0, hunk.headerLen() - 1),
173+
"@@ -1,19 +1 @@"
174+
);
175+
done();
168176
});
169177
});
170178
});

0 commit comments

Comments
 (0)