Get the name of a number, even if it's stupidly big.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

29 行
871 B

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