Uint8Array migration
This commit is contained in:
parent
daf75190b8
commit
4ef0bf96cc
137 changed files with 2202 additions and 3170 deletions
19
ts/test-electron/util/imagePathToBytes_test.ts
Normal file
19
ts/test-electron/util/imagePathToBytes_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 { imagePathToBytes } from '../../util/imagePathToBytes';
|
||||
|
||||
describe('imagePathToBytes', () => {
|
||||
it('converts an image to an Bytes', async () => {
|
||||
const avatarPath = path.join(
|
||||
__dirname,
|
||||
'../../../fixtures/kitten-3-64-64.jpg'
|
||||
);
|
||||
const buffer = await imagePathToBytes(avatarPath);
|
||||
assert.isDefined(buffer);
|
||||
assert(buffer instanceof Uint8Array);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue