We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97a8e38 commit 2b0ee55Copy full SHA for 2b0ee55
1 file changed
test/tests/diff.js
@@ -88,15 +88,15 @@ describe("Diff", function() {
88
it.only("can diff the workdir with index", function() {
89
var patches = this.workdirDiff.patches();
90
assert.equal(patches.length, 1);
91
+ assert(patches[0].isUntracked());
92
- var hunks = patches[0].hunks();
93
- assert.equal(hunks.length, 1);
+ var oldFile = patches[0].delta.oldFile();
94
+ assert.equal(oldFile.path(), "wddiff.txt");
95
+ assert.equal(oldFile.size(), 0);
96
- var lines = hunks[0].lines();
- assert.equal(
97
- lines[0].content().substr(0, lines[0].contentLen()),
98
- "1 line\n"
99
- );
+ var newFile = patches[0].delta.newFile();
+ assert.equal(newFile.path(), "wddiff.txt");
+ assert.equal(newFile.size(), 23);
100
});
101
102
it("can diff with a null tree", function() {
0 commit comments