-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtest.js
More file actions
19 lines (16 loc) · 818 Bytes
/
test.js
File metadata and controls
19 lines (16 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const lib = require("./lib");
test('have to "c b a"', () => {
expect(lib.reverse("abc def jhi")).toBe("jhi def abc");
expect(lib.reverse("Мама мыла раму")).toBe("раму мыла Мама");
expect(lib.reverse("1 2 3 4 5 6")).toBe("6 5 4 3 2 1");
});
test('have to "c b a"', () => {
expect(lib.sort("a bbb cccc ddd e")).toBe("cccc bbb ddd a e");
expect(lib.sort("Мама мыла раму")).toBe("Мама мыла раму");
expect(lib.sort("aaa1 b4 cc2")).toBe("aaa1 cc2 b4");
});
test('have to "c b a"', () => {
expect(lib.strip(" aaa bb c ")).toBe("aaa bb c");
expect(lib.strip(" Мама мыла раму ")).toBe("Мама мыла раму");
expect(lib.strip(" Something is wrong")).toBe("Something is wrong");
});