|  | 
| 1 |  | -import { LocalMaximomPoint } from '../LocalMaximomPoint' | 
|  | 1 | +import { LocalMaximumPoint } from '../LocalMaximumPoint' | 
| 2 | 2 | 
 | 
| 3 | 3 | describe('LocalMaximumPoint tests', () => { | 
| 4 | 4 |   it('test boundary maximum points - last element', () => { | 
| 5 | 5 |     const Array = [1, 2, 3, 4, 5, 6, 12] | 
| 6 |  | -    expect(LocalMaximomPoint(Array)).toEqual(6) | 
|  | 6 | +    expect(LocalMaximumPoint(Array)).toEqual(6) | 
| 7 | 7 |   }) | 
| 8 | 8 | 
 | 
| 9 | 9 |   it('test boundary maximum points - first element', () => { | 
| 10 | 10 |     const Array2 = [13, 6, 5, 4, 3, 2, 1] | 
| 11 |  | -    expect(LocalMaximomPoint(Array2)).toEqual(0) | 
|  | 11 | +    expect(LocalMaximumPoint(Array2)).toEqual(0) | 
| 12 | 12 |   }) | 
| 13 | 13 | 
 | 
| 14 |  | -  it('test boundary maximum points - should find first maximom point from the top', () => { | 
|  | 14 | +  it('test boundary maximum points - should find first maximum point from the top', () => { | 
| 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 |  | -    expect(LocalMaximomPoint(Array)).toEqual(6) | 
|  | 17 | +    expect(LocalMaximumPoint(Array)).toEqual(6) | 
| 18 | 18 |   }) | 
| 19 | 19 | 
 | 
| 20 | 20 |   it('test inner points - second element', () => { | 
| 21 | 21 |     const Array2 = [13, 16, 5, 4, 3, 2, 1] | 
| 22 |  | -    expect(LocalMaximomPoint(Array2)).toEqual(1) | 
|  | 22 | +    expect(LocalMaximumPoint(Array2)).toEqual(1) | 
| 23 | 23 |   }) | 
| 24 | 24 | 
 | 
| 25 | 25 |   it('test inner points - element some where in the middle', () => { | 
| 26 | 26 |     const Array2 = [13, 16, 5, 41, 3, 2, 1] | 
| 27 |  | -    expect(LocalMaximomPoint(Array2)).toEqual(3) | 
|  | 27 | +    expect(LocalMaximumPoint(Array2)).toEqual(3) | 
| 28 | 28 |   }) | 
| 29 | 29 | }) | 
0 commit comments