Edit profile

This commit is contained in:
Josh Perez
2021-07-19 15:26:06 -04:00
committed by GitHub
parent f14c426170
commit cd35a29638
42 changed files with 2124 additions and 356 deletions

View File

@@ -0,0 +1,19 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
import { assert } from 'chai';
import path from 'path';
import { imagePathToArrayBuffer } from '../../util/imagePathToArrayBuffer';
describe('imagePathToArrayBuffer', () => {
it('converts an image to an ArrayBuffer', async () => {
const avatarPath = path.join(
__dirname,
'../../../fixtures/kitten-3-64-64.jpg'
);
const buffer = await imagePathToArrayBuffer(avatarPath);
assert.isDefined(buffer);
assert(buffer instanceof ArrayBuffer);
});
});