-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlsd.test.js
More file actions
24 lines (20 loc) · 748 Bytes
/
Copy pathlsd.test.js
File metadata and controls
24 lines (20 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const lsd = require("./lsd");
const arrayFactoryUtils = require("../../../mocks/arrayFactoryUtils");
describe("lsd", () => {
it("should sort two element array", () => {
expect(lsd([3, 2, 1]))
.toEqual([1, 2, 3]);
});
it("should sort two element array", () => {
expect(lsd(arrayFactoryUtils.getTwoElementArray()))
.toEqual([1, 2]);
});
it("should sort the array", () => {
expect(lsd(arrayFactoryUtils.getUnsortedArray()))
.toEqual(arrayFactoryUtils.getSortedArray());
});
it("should sort two element array", () => {
expect(lsd(arrayFactoryUtils.getLargeNumberArray()))
.toEqual(arrayFactoryUtils.getSortedLargeNumberArray());
});
});