Useful methods for file-related functions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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