index.test.js 304 B

123456789101112131415
  1. // @ts-check
  2. import {
  3. isBlob,
  4. isFile,
  5. } from '../dist/index.cjs'
  6. test('isBlob', () => {
  7. expect(isBlob(Blob)).toBe(false)
  8. expect(isBlob(new Blob())).toBe(true)
  9. })
  10. test('isFile', () => {
  11. expect(isFile(File)).toBe(false)
  12. expect(isFile(new File([''], '', { type: 'text/html' }))).toBe(true)
  13. })