Useful methods for file-related functions.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

23 wiersze
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. })