mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 09:58:12 +01:00
Edit profile
This commit is contained in:
19
ts/test-electron/util/imagePathToArrayBuffer_test.ts
Normal file
19
ts/test-electron/util/imagePathToArrayBuffer_test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user