Skip to content

Commit f605a53

Browse files
committed
Add tests for lsd
1 parent 3038569 commit f605a53

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

test/sorting/least-significant-digit/lsd.spec.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@ describe('Least-Significant Digit', function () {
1414
expect(arr[0]).toBe('a');
1515
});
1616

17-
// it('should work with arrays with equally length strings', function () {
18-
// var arr = ['bb', 'aa', 'cc'];
19-
// lsd(arr);
20-
// expect(arr.length).toBe(3);
21-
// expect(arr[0]).toBe('aa');
22-
// expect(arr[1]).toBe('bb');
23-
// expect(arr[2]).toBe('cc');
24-
// });
25-
//
26-
// it('should work with arrays with differently length strings', function () {
27-
// var arr = ['bb', 'aaa', 'a', 'aa'];
28-
// lsd(arr);
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');
34-
// });
17+
it('should work with arrays with equally length strings', function () {
18+
var arr = ['bb', 'aa', 'cc'];
19+
lsd(arr);
20+
expect(arr.length).toBe(3);
21+
expect(arr[0]).toBe('aa');
22+
expect(arr[1]).toBe('bb');
23+
expect(arr[2]).toBe('cc');
24+
});
25+
26+
it('should work with arrays with equally length strings', function () {
27+
var arr = ['bbb', 'aac', 'aaa'];
28+
lsd(arr, 3);
29+
expect(arr.length).toBe(3);
30+
expect(arr[0]).toBe('aaa');
31+
expect(arr[1]).toBe('aac');
32+
expect(arr[2]).toBe('bbb');
33+
});
3534
});

0 commit comments

Comments
 (0)