Get the name of a number, even if it's stupidly big.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.

29 líneas
675 B

  1. import tens from './tens'
  2. it('should exist', () => {
  3. expect(tens).toBeDefined()
  4. })
  5. it('should be a callable', () => {
  6. expect(typeof tens).toBe('function')
  7. })
  8. it('should accept 1 argument', () => {
  9. expect(tens).toHaveLength(1)
  10. })
  11. test.each`
  12. value | display | name
  13. ${1} | ${'10'} | ${'des'}
  14. ${2} | ${'20'} | ${'bihin'}
  15. ${3} | ${'30'} | ${'trihin'}
  16. ${4} | ${'40'} | ${'kuwadrahin'}
  17. ${5} | ${'50'} | ${'kuwinkuwahin'}
  18. ${6} | ${'60'} | ${'seksahin'}
  19. ${7} | ${'70'} | ${'septuwahin'}
  20. ${8} | ${'80'} | ${'oktohin'}
  21. ${9} | ${'90'} | ${'nonahin'}
  22. `('should return "$name" on $display', ({ value, name }) => {
  23. expect(tens(value)).toBe(name)
  24. })