26 lines
701 B
JavaScript
26 lines
701 B
JavaScript
import { getPositionIndex } from '../seasons-tools';
|
|
|
|
describe('process/payments/lib/seasons-tools', () => {
|
|
describe('[function] getPositionIndex', () => {
|
|
test('should return 0', () => {
|
|
const result = getPositionIndex(100_000_001, 0);
|
|
expect(result).toEqual(0);
|
|
});
|
|
|
|
test('should return 0', () => {
|
|
const result = getPositionIndex(100_000_001, 7);
|
|
expect(result).toEqual(0);
|
|
});
|
|
|
|
test('should return 1', () => {
|
|
const result = getPositionIndex(100_000_001, 8);
|
|
expect(result).toEqual(1);
|
|
});
|
|
|
|
test('should return 1', () => {
|
|
const result = getPositionIndex(100_000_001, 11);
|
|
expect(result).toEqual(1);
|
|
});
|
|
});
|
|
});
|