Get the name of a number, even if it's stupidly big.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.

30 lignes
747 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'} | ${'sampu'}
  14. ${1} | ${'11'} | ${'labing-isa'}
  15. ${2} | ${'12'} | ${'labindalawa'}
  16. ${3} | ${'13'} | ${'labintatlo'}
  17. ${4} | ${'14'} | ${'labing-apat'}
  18. ${5} | ${'15'} | ${'labinlima'}
  19. ${6} | ${'16'} | ${'labing-anim'}
  20. ${7} | ${'17'} | ${'labimpito'}
  21. ${8} | ${'18'} | ${'labingwalo'}
  22. ${9} | ${'19'} | ${'labinsiyam'}
  23. `('should return "$name" on $display', ({ value, name }) => {
  24. expect(tenPlus(value)).toBe(name)
  25. })