Get the name of a number, even if it's stupidly big.
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Pode ver ficheiros e cloná-lo, mas não pode fazer envios ou lançar questões ou pedidos de integração.

29 linhas
754 B

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