|
- import hundredTimes from './hundredTimes'
-
- it('should exist', () => {
- expect(hundredTimes).toBeDefined()
- })
-
- it('should be a callable', () => {
- expect(typeof hundredTimes).toBe('function')
- })
-
- it('should accept 1 argument', () => {
- expect(hundredTimes).toHaveLength(1)
- })
-
- test.each`
- value | display | name
- ${1} | ${'100'} | ${'sandaan'}
- ${2} | ${'200'} | ${'dalawandaan'}
- ${3} | ${'300'} | ${'tatlongdaan'}
- ${4} | ${'400'} | ${'apatnaraan'}
- ${5} | ${'500'} | ${'limandaan'}
- ${6} | ${'600'} | ${'animnaraan'}
- ${7} | ${'700'} | ${'pitongdaan'}
- ${8} | ${'800'} | ${'walongdaan'}
- ${9} | ${'900'} | ${'siyamnaraan'}
- `('should return "$name" on $display', ({ value, name }) => {
- expect(hundredTimes(value)).toBe(name)
- })
|