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.
12 lines
434 B
12 lines
434 B
import { describe, expect, it } from '@jest/globals'
|
|
import dataURItoBlob from './dataURItoBlob.js'
|
|
import sampleImageDataURI from './sampleImageDataURI.js'
|
|
|
|
describe('dataURItoBlob', () => {
|
|
it('should convert a data uri to a blob', () => {
|
|
const blob = dataURItoBlob(sampleImageDataURI, {})
|
|
expect(blob instanceof Blob).toEqual(true)
|
|
expect(blob.size).toEqual(9348)
|
|
expect(blob.type).toEqual('image/jpeg')
|
|
})
|
|
})
|
|
|