Useful methods for file-related functions.
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.

23 líneas
483 B

  1. import * as fc from 'fast-check'
  2. import calculateHash from './calculateHash'
  3. it('should exist', () => {
  4. expect(calculateHash).toBeDefined()
  5. })
  6. it('should be a callable', () => {
  7. expect(typeof calculateHash).toBe('function')
  8. })
  9. it('should accept a minimum of 1 argument', () => {
  10. expect(calculateHash).toHaveLength(1)
  11. })
  12. it('should return a string', () => {
  13. fc.assert(
  14. fc.property(fc.string(), s => {
  15. expect(typeof calculateHash(s)).toBe('string')
  16. })
  17. )
  18. })