1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-01 08:18:53 +09:00
YuruToot/app/javascript/mastodon/utils/__tests__/base64-test.js
Yamagishi Kazutoshi 0758b00bfd Refactor resizeImage method (#7236)
- Use URL.createObjectURL (replace from FileReader)
- Use HTMLCanvasElement.prototype.toBlob
  (replace from HTMLCanvasElement.prototype.toDataURL)
- Use Promise (replace callback interface)
2018-04-23 09:15:51 +02:00

11 lines
262 B
JavaScript

import * as base64 from '../base64';
describe('base64', () => {
describe('decode', () => {
it('returns a uint8 array', () => {
const arr = base64.decode('dGVzdA==');
expect(arr).toEqual(new Uint8Array([116, 101, 115, 116]));
});
});
});