mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 08:58:19 +01:00
Use streams to download attachments directly to disk
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
@@ -35,7 +35,12 @@ describe('scaleImageToLevel', () => {
|
||||
testCases.map(
|
||||
async ({ path, contentType, expectedWidth, expectedHeight }) => {
|
||||
const blob = await getBlob(path);
|
||||
const scaled = await scaleImageToLevel(blob, contentType, true);
|
||||
const scaled = await scaleImageToLevel(
|
||||
blob,
|
||||
contentType,
|
||||
blob.size,
|
||||
true
|
||||
);
|
||||
|
||||
const data = await loadImage(scaled.blob, { orientation: true });
|
||||
const { originalWidth: width, originalHeight: height } = data;
|
||||
@@ -56,7 +61,7 @@ describe('scaleImageToLevel', () => {
|
||||
'Test setup failure: expected fixture to have EXIF data'
|
||||
);
|
||||
|
||||
const scaled = await scaleImageToLevel(original, IMAGE_JPEG, true);
|
||||
const scaled = await scaleImageToLevel(original, IMAGE_JPEG, original.size);
|
||||
assert.isUndefined(
|
||||
(await loadImage(scaled.blob, { meta: true, orientation: true })).exif
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user