Get the name of a number, even if it's stupidly big.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

30 rindas
721 B

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