-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
28 lines (25 loc) · 940 Bytes
/
test.js
File metadata and controls
28 lines (25 loc) · 940 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
25
26
27
28
var expect = chai.expect;
describe('findLongestWordLength', () => {
it("'I will keep practicing javascript' should return 'practicing'", () => {
expect(findLongestWordLength("I will keep practicing javascript")).to.equal('practicing');
});
it("' ' should return ' '", () => {
expect(findLongestWordLength('')).to.equal('');
});
it("Number 12 should return ''", () => {
expect(findLongestWordLength(12)).to.equal('');
});
});
const arrOfFour = [[1,2,3,4], [5,18,0,12], [3,5,12,5], [28,9,2,34]],
arrOfThree = [[1, 2], [2, 3], [3, 4]]
describe('findLargestOfArrays', () => {
it('Test 1', () => {
expect(findLargestOfArrays(arrOfFour)).to.have.ordered.members([4, 18, 12, 34])
})
it('Test 2', () => {
expect(findLargestOfArrays(arrOfThree)).to.have.ordered.members([2, 3, 4])
})
it('Test 3', () => {
expect(findLargestOfArrays(" ")).to.have.ordered.members([])
})
})