|
- import tens from './tens'
-
- it('should exist', () => {
- expect(tens).toBeDefined()
- })
-
- it('should be a callable', () => {
- expect(typeof tens).toBe('function')
- })
-
- it('should accept 1 argument', () => {
- expect(tens).toHaveLength(1)
- })
-
- test.each`
- value | display | name
- ${1} | ${'10'} | ${'des'}
- ${2} | ${'20'} | ${'bihin'}
- ${3} | ${'30'} | ${'trihin'}
- ${4} | ${'40'} | ${'kuwadrahin'}
- ${5} | ${'50'} | ${'kuwinkuwahin'}
- ${6} | ${'60'} | ${'seksahin'}
- ${7} | ${'70'} | ${'septuwahin'}
- ${8} | ${'80'} | ${'oktohin'}
- ${9} | ${'90'} | ${'nonahin'}
- `('should return "$name" on $display', ({ value, name }) => {
- expect(tens(value)).toBe(name)
- })
|