|
- import hundreds from './hundreds'
-
- it('should exist', () => {
- expect(hundreds).toBeDefined()
- })
-
- it('should be a callable', () => {
- expect(typeof hundreds).toBe('function')
- })
-
- it('should accept 1 argument', () => {
- expect(hundreds).toHaveLength(1)
- })
-
- test.each`
- value | display | name
- ${1} | ${'100'} | ${'sen'}
- ${2} | ${'200'} | ${'duwosen'}
- ${3} | ${'300'} | ${'tresen'}
- ${4} | ${'400'} | ${'kuwadringhen'}
- ${5} | ${'500'} | ${'kuwinghen'}
- ${6} | ${'600'} | ${'sesen'}
- ${7} | ${'700'} | ${'septinghen'}
- ${8} | ${'800'} | ${'oktinghen'}
- ${9} | ${'900'} | ${'nonghen'}
- `('should return "$name" on $display', ({ value, name }) => {
- expect(hundreds(value)).toBe(name)
- })
|