mirror of
https://github.com/Warky-Devs/artemis-kit.git
synced 2025-05-19 03:37:30 +00:00
11 lines
400 B
TypeScript
11 lines
400 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { blobToBase64 } from './BlobToBase64'
|
|
|
|
describe('blobToBase64', () => {
|
|
it('should convert a Blob object to a base64 encoded string', async () => {
|
|
const content = 'Hello, world!'
|
|
const blob = new Blob([content], { type: 'text/plain' })
|
|
const base64 = await blobToBase64(blob)
|
|
expect(base64).toBe('SGVsbG8sIHdvcmxkIQ==')
|
|
})
|
|
}) |