|
1 | 1 | import { NumberOfLocalMaximumPoints } from '../NumberOfLocalMaximumPoints' |
2 | 2 |
|
3 | 3 | describe('LocalMaximomPoint tests', () => { |
4 | | - it('test boundry maximom points - last element', () => { |
| 4 | + it('test boundary maximum points - last element', () => { |
5 | 5 | const Array = [1, 2, 3, 4, 5, 6, 12] |
6 | 6 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(1) |
7 | 7 | }) |
8 | 8 |
|
9 | | - it('test boundry maximom points - first element', () => { |
| 9 | + it('test boundary maximum points - first element', () => { |
10 | 10 | const Array = [13, 6, 5, 4, 3, 2, 1] |
11 | 11 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(1) |
12 | 12 | }) |
13 | 13 |
|
14 | | - it('test boundry maximom points - both boundries have maximum points', () => { |
| 14 | + it('test boundary maximum points - both boundaries have maximum points', () => { |
15 | 15 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) |
16 | 16 | const Array = [13, 2, 3, 4, 5, 6, 12] |
17 | 17 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(2) |
18 | 18 | }) |
19 | 19 |
|
20 | | - it('multiple maximom points in the middle', () => { |
| 20 | + it('multiple maximum points in the middle', () => { |
21 | 21 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) |
22 | 22 | const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0] |
23 | 23 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(3) |
24 | 24 | }) |
25 | 25 |
|
26 | | - it('multiple maximom points in the middle with one at end', () => { |
| 26 | + it('multiple maximum points in the middle with one at end', () => { |
27 | 27 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) |
28 | 28 | const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 10] |
29 | 29 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(4) |
30 | 30 | }) |
31 | 31 |
|
32 | | - it('multiple maximom points in the middle with one at start', () => { |
| 32 | + it('multiple maximum points in the middle with one at start', () => { |
33 | 33 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) |
34 | 34 | const Array = [10, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0] |
35 | 35 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(3) |
36 | 36 | }) |
37 | 37 |
|
38 | | - it('multiple maximom points in the middle with two more at both ends', () => { |
| 38 | + it('multiple maximum points in the middle with two more at both ends', () => { |
39 | 39 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) |
40 | 40 | const Array = [10, 3, 11, 5, 6, 9, 2, 7, 12, 1, 10] |
41 | 41 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(5) |
|
0 commit comments