mirror of https://github.com/ghostfolio/ghostfolio
Thomas Kaul
2 years ago
committed by
GitHub
2 changed files with 35 additions and 17 deletions
@ -0,0 +1,15 @@ |
|||
import { BenchmarkService } from './benchmark.service'; |
|||
|
|||
describe('BenchmarkService', () => { |
|||
let benchmarkService: BenchmarkService; |
|||
|
|||
beforeAll(async () => { |
|||
benchmarkService = new BenchmarkService(null, null, null, null, null); |
|||
}); |
|||
|
|||
it('calculateChangeInPercentage', async () => { |
|||
expect(benchmarkService.calculateChangeInPercentage(1, 2)).toEqual(1); |
|||
expect(benchmarkService.calculateChangeInPercentage(2, 2)).toEqual(0); |
|||
expect(benchmarkService.calculateChangeInPercentage(2, 1)).toEqual(-0.5); |
|||
}); |
|||
}); |
Loading…
Reference in new issue