Blame view

node_modules/is-what/test/index.test.js 304 Bytes
7820380e   “wangming”   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  // @ts-check
  import {
    isBlob,
    isFile,
  } from '../dist/index.cjs'
  
  test('isBlob', () => {
    expect(isBlob(Blob)).toBe(false)
    expect(isBlob(new Blob())).toBe(true)
  })
  
  test('isFile', () => {
    expect(isFile(File)).toBe(false)
    expect(isFile(new File([''], '', { type: 'text/html' }))).toBe(true)
  })