1 | import BigInteger from './BigInteger';
|
2 |
|
3 | describe('BigInteger', () => {
|
4 | describe('.toString(radix)', () => {
|
5 | it('should support positive numbers', () => {
|
6 | expect(new BigInteger('abcd1234', 16).toString(4)).toBe(
|
7 | '2223303101020310'
|
8 | );
|
9 | });
|
10 |
|
11 | it('should support negative numbers', () => {
|
12 | expect(new BigInteger('-abcd1234', 16).toString(4)).toBe(
|
13 | '-2223303101020310'
|
14 | );
|
15 | });
|
16 | });
|
17 | });
|