|
- import tenPlus from './tenPlus'
-
- it('should exist', () => {
- expect(tenPlus).toBeDefined()
- })
-
- it('should be a callable', () => {
- expect(typeof tenPlus).toBe('function')
- })
-
- it('should accept 1 argument', () => {
- expect(tenPlus).toHaveLength(1)
- })
-
- test.each`
- value | display | name
- ${0} | ${'10'} | ${'zehn'}
- ${1} | ${'11'} | ${'elf'}
- ${2} | ${'12'} | ${'zwölf'}
- ${3} | ${'13'} | ${'dreizehn'}
- ${4} | ${'14'} | ${'vierzehn'}
- ${5} | ${'15'} | ${'fünfzehn'}
- ${6} | ${'16'} | ${'sechzehn'}
- ${7} | ${'17'} | ${'siebzehn'}
- ${8} | ${'18'} | ${'achtzehn'}
- ${9} | ${'19'} | ${'neunzehn'}
- `('should return "$name" on $display', ({ value, name }) => {
- expect(tenPlus(value)).toBe(name)
- })
|