Skip to content

Commit ebb6a56

Browse files
committed
Add test case
1 parent c59a0d0 commit ebb6a56

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎test/sorting/most-significant-digit/msd.spec.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ describe('Most-Significant Digit', function () {
2323
expect(arr[2]).toBe('cc');
2424
});
2525

26-
it('should work with arrays with equally length strings', function () {
27-
var arr = ['bb', 'aa', 'cc'];
26+
it('should work with arrays with differently length strings', function () {
27+
var arr = ['bb', 'aaa', 'a', 'aa'];
2828
msd(arr);
29-
expect(arr.length).toBe(3);
30-
expect(arr[0]).toBe('aa');
31-
expect(arr[1]).toBe('bb');
32-
expect(arr[2]).toBe('cc');
29+
expect(arr.length).toBe(4);
30+
expect(arr[0]).toBe('a');
31+
expect(arr[1]).toBe('aa');
32+
expect(arr[2]).toBe('aaa');
33+
expect(arr[3]).toBe('bb');
3334
});
3435
});

0 commit comments

Comments
 (0)