Skip to content

Commit d7ba507

Browse files
Fix existing tests
1 parent 3260dcc commit d7ba507

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Diff for: test/diff/array.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ describe('diff/array', function() {
1010
console.log(diffResult);
1111
expect(diffResult).to.deep.equals([
1212
{count: 1, value: [a]},
13-
{count: 1, value: [c], removed: undefined, added: true},
14-
{count: 1, value: [b]},
15-
{count: 1, value: [c], removed: true, added: undefined}
13+
{count: 1, value: [b], removed: true, added: undefined},
14+
{count: 1, value: [c]},
15+
{count: 1, value: [b], removed: undefined, added: true}
1616
]);
1717
});
1818
it('should diff falsey values', function() {
1919
const a = false;
2020
const b = 0;
2121
const c = '';
2222
// Example sequences from Myers 1986
23-
const arrayA = [c, b, a, b, a, c];
24-
const arrayB = [a, b, c, a, b, b, a];
23+
const arrayA = [a, b, c, a, b, b, a];
24+
const arrayB = [c, b, a, b, a, c];
2525
const diffResult = diffArrays(arrayA, arrayB);
2626
expect(diffResult).to.deep.equals([
27-
{count: 2, value: [a, b], removed: undefined, added: true},
27+
{count: 2, value: [a, b], removed: true, added: undefined},
2828
{count: 1, value: [c]},
29-
{count: 1, value: [b], removed: true, added: undefined},
30-
{count: 2, value: [a, b]},
3129
{count: 1, value: [b], removed: undefined, added: true},
30+
{count: 2, value: [a, b]},
31+
{count: 1, value: [b], removed: true, added: undefined},
3232
{count: 1, value: [a]},
33-
{count: 1, value: [c], removed: true, added: undefined}
33+
{count: 1, value: [c], removed: undefined, added: true}
3434
]);
3535
});
3636
describe('anti-aliasing', function() {

Diff for: test/diff/word.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ describe('WordDiff', function() {
181181

182182
it('should diff multiple whitespace values', function() {
183183
const diffResult = diffWordsWithSpace('New Value ', 'New ValueMoreData ');
184-
expect(convertChangesToXML(diffResult)).to.equal('New<ins> ValueMoreData</ins> <del>Value </del>');
184+
expect(convertChangesToXML(diffResult)).to.equal('New<del> Value</del> <ins>ValueMoreData </ins>');
185185
});
186186

187187
it('should inserts values in parenthesis', function() {
@@ -220,7 +220,7 @@ describe('WordDiff', function() {
220220

221221
it('should perform async operations', function(done) {
222222
diffWordsWithSpace('New Value ', 'New ValueMoreData ', function(err, diffResult) {
223-
expect(convertChangesToXML(diffResult)).to.equal('New<ins> ValueMoreData</ins> <del>Value </del>');
223+
expect(convertChangesToXML(diffResult)).to.equal('New<del> Value</del> <ins>ValueMoreData </ins>');
224224
done();
225225
});
226226
});

0 commit comments

Comments
 (0)