Skip to content

Commit b2af2dd

Browse files
committed
test: adjust constant position
1 parent 7f911d3 commit b2af2dd

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

test/linked-list.spec.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,26 @@ import { expect } from 'chai'
33

44
import LinkedList from '../src/data-structure/linked-list.js'
55

6-
let linkedList1 = new LinkedList()
7-
linkedList1.push(1)
8-
linkedList1.push(2)
9-
linkedList1.push(3)
10-
linkedList1.push(4)
11-
linkedList1.push(5)
12-
13-
let linkedList2 = new LinkedList()
14-
linkedList2.push(1)
15-
linkedList2.push(2)
16-
linkedList2.push(3)
17-
linkedList2.push(4)
18-
linkedList2.push(5)
19-
// console.log(linkedList.toString())
20-
// console.log(linkedList2.reverse().toString())
21-
226
describe('LinkedList', () => {
237
it('print linked list', () => {
8+
let linkedList1 = new LinkedList()
9+
linkedList1.push(1)
10+
linkedList1.push(2)
11+
linkedList1.push(3)
12+
linkedList1.push(4)
13+
linkedList1.push(5)
14+
// console.log(linkedList.toString())
2415
expect(linkedList1.toString()).to.equal('1,2,3,4,5')
2516
})
17+
2618
it('reverse linked list', () => {
19+
let linkedList2 = new LinkedList()
20+
linkedList2.push(1)
21+
linkedList2.push(2)
22+
linkedList2.push(3)
23+
linkedList2.push(4)
24+
linkedList2.push(5)
25+
// console.log(linkedList2.reverse().toString())
2726
expect(linkedList2.reverse().toString()).to.equal('5,4,3,2,1')
2827
})
2928
})

test/search.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('binary Search', () => {
1414
expect( binarySearch(arr, 68)).to.equal(-1)
1515
})
1616

17-
it('search 22 but not exist', () => {
17+
it('search 22 is exist and index is 3', () => {
1818
expect( binarySearch(arr, 22)).to.equal(3)
1919
})
2020
})

0 commit comments

Comments
 (0)