|
- import getShortKiloName from './getShortKiloName'
-
- it('should exist', () => {
- expect(getShortKiloName).toBeDefined()
- })
-
- it('should be a callable', () => {
- expect(typeof getShortKiloName).toBe('function')
- })
-
- it('should accept 1 argument', () => {
- expect(getShortKiloName).toHaveLength(1)
- })
-
- test.each`
- thousandPower | name
- ${0n} | ${''}
- ${1n} | ${'libo'}
- ${2n} | ${'milyon'}
- ${3n} | ${'bilyon'}
- ${4n} | ${'trilyon'}
- ${5n} | ${'kuwadrilyon'}
- ${6n} | ${'kuwintilyon'}
- ${7n} | ${'sekstilyon'}
- ${8n} | ${'septilyon'}
- ${9n} | ${'oktilyon'}
- ${10n} | ${'nonilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${11n} | ${'desilyon'}
- ${21n} | ${'bihintilyon'}
- ${31n} | ${'trihintilyon'}
- ${41n} | ${'kuwadrahintilyon'}
- ${51n} | ${'kuwinkuwahintilyon'}
- ${61n} | ${'seksahintilyon'}
- ${71n} | ${'septuwahintilyon'}
- ${81n} | ${'oktohintilyon'}
- ${91n} | ${'nonahintilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${101n} | ${'sentilyon'}
- ${201n} | ${'duwosentilyon'}
- ${301n} | ${'tresentilyon'}
- ${401n} | ${'kuwadringhentilyon'}
- ${501n} | ${'kuwinghentilyon'}
- ${601n} | ${'sesentilyon'}
- ${701n} | ${'septinghentilyon'}
- ${801n} | ${'oktinghentilyon'}
- ${901n} | ${'nonghentilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${1001n} | ${'milyatilyon'}
- ${2001n} | ${'duwomilyatilyon'}
- ${3001n} | ${'tremilyatilyon'}
- ${4001n} | ${'kuwatuwormilyatilyon'}
- ${5001n} | ${'kuwinmilyatilyon'}
- ${6001n} | ${'seksmilyatilyon'}
- ${7001n} | ${'septenmilyatilyon'}
- ${8001n} | ${'oktomilyatilyon'}
- ${9001n} | ${'nobemmilyatilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${10001n} | ${'desmilyatilyon'}
- ${20001n} | ${'bihinmilyatilyon'}
- ${30001n} | ${'trihinmilyatilyon'}
- ${40001n} | ${'kuwadrahinmilyatilyon'}
- ${50001n} | ${'kuwinkuwahinmilyatilyon'}
- ${60001n} | ${'seksahinmilyatilyon'}
- ${70001n} | ${'septuwahinmilyatilyon'}
- ${80001n} | ${'oktohinmilyatilyon'}
- ${90001n} | ${'nonahinmilyatilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${100001n} | ${'senmilyatilyon'}
- ${200001n} | ${'duwosenmilyatilyon'}
- ${300001n} | ${'tresenmilyatilyon'}
- ${400001n} | ${'kuwadringhenmilyatilyon'}
- ${500001n} | ${'kuwinghenmilyatilyon'}
- ${600001n} | ${'sesenmilyatilyon'}
- ${700001n} | ${'septinghenmilyatilyon'}
- ${800001n} | ${'oktinghenmilyatilyon'}
- ${900001n} | ${'nonghenmilyatilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
-
- test.each`
- thousandPower | name
- ${1000001n} | ${'milyamilyatilyon'}
- ${2000001n} | ${'duwomilyamilyatilyon'}
- ${3000001n} | ${'tremilyamilyatilyon'}
- ${4000001n} | ${'kuwatuwormilyamilyatilyon'}
- ${5000001n} | ${'kuwinmilyamilyatilyon'}
- ${6000001n} | ${'seksmilyamilyatilyon'}
- ${7000001n} | ${'septenmilyamilyatilyon'}
- ${8000001n} | ${'oktomilyamilyatilyon'}
- ${9000001n} | ${'nobemmilyamilyatilyon'}
- `('should return "$name" for 1000^$thousandPower', ({ name, thousandPower }) => {
- expect(getShortKiloName(thousandPower)).toBe(name)
- })
|