-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchallenge22.test.js
More file actions
45 lines (39 loc) · 1.06 KB
/
challenge22.test.js
File metadata and controls
45 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const checkStepNumbers = require('./index.js')
test("Test #1 - Retorna un Booleano", () => {
expect(
typeof(
checkStepNumbers(
["tree_1", "tree_2", "house", "tree_1", "tree_2", "house"],
[1, 33, 10, 2, 44, 20]
)
)
).toStrictEqual("boolean")
})
test("Test #2", () => {
expect(
checkStepNumbers(
["tree_1", "tree_2", "house", "tree_1", "tree_2", "house"],
[1, 33, 10, 2, 44, 20]
)
).toStrictEqual(true)
})
test("Test #3", () => {
expect(
checkStepNumbers(["tree_1", "tree_1", "house"], [2, 1, 10])
).toStrictEqual(false)
})
test("Test #4", () => {
expect(
checkStepNumbers(["tree_1", "tree_1", "house"], [1, 2, 10])
).toStrictEqual(true)
})
test("Test #5", () => {
expect(
checkStepNumbers(["house", "house", "tree_1", "tree_1", "house", "tree_2", "tree_2", "tree_3"], [5, 2, 1, 2, 3, 4, 5, 6])
).toStrictEqual(false)
})
test("Custom Test", () => {
expect(
checkStepNumbers(["tree_1", "tree_2", "house", "tree_1", "tree_2", "house"], [1, 33, 10, 2, 33, 20])
).toStrictEqual(false)
})