import { expect } from 'chai'
import { describe, it } from 'mocha'
import { urlToBase64 } from '../src/urlToBase64.js'

describe('urlToBase64.ts', () => {
  describe('urlToBase64 function', () => {
    it('Will convert a png image to base64', async () => {
      expect(await urlToBase64('https://raw.githubusercontent.com/discordeno/discordeno/main/site/static/img/logo.png')).equal(
        'data:image/png;base64,[encoded data, 17576 characters]',
      )
    })
  })
})
