|
- import getNumberName from '../../../index';
-
- describe('Custom numbers', () => {
- it('converts 123456000 to one hundred twenty three million four hundred fifty six thousand', () => {
- expect(getNumberName(123456000)).toBe('one hundred twenty three million four hundred fifty six thousand');
- });
- it('converts 123456000 to one hundred twenty three million four hundred fifty six thousand nine', () => {
- expect(getNumberName(123456009)).toBe('one hundred twenty three million four hundred fifty six thousand nine');
- });
-
- it('converts 123000789 to one hundred twenty three million seven hundred eighty nine', () => {
- expect(getNumberName(123000789)).toBe('one hundred twenty three million seven hundred eighty nine');
- });
-
- it('converts 123050789 to one hundred twenty three million fifty thousand seven hundred eighty nine', () => {
- expect(getNumberName(123050789)).toBe('one hundred twenty three million fifty thousand seven hundred eighty nine');
- });
-
- it(
- 'converts 123456789 to one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine',
- () => {
- expect(getNumberName(123456789))
- .toBe('one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine');
- },
- );
-
- it(
- 'converts -123456789 to negative one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine',
- () => {
- expect(getNumberName(-123456789))
- .toBe('negative one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine');
- },
- );
- });
|