From 6aab658ec6c7ee4e4750c72e7928fe796201f776 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 15 Jan 2025 14:01:35 +0000 Subject: [PATCH] Merge pull request #22894 from overleaf/jpa-large-chunk [history-v1] add test case for large text file GitOrigin-RevId: 5d7cc37d74c67e1927785ea9c544d897491e6abd --- .../test/acceptance/js/storage/backupBlob.test.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/history-v1/test/acceptance/js/storage/backupBlob.test.mjs b/services/history-v1/test/acceptance/js/storage/backupBlob.test.mjs index 161acb7a55..8e05e76819 100644 --- a/services/history-v1/test/acceptance/js/storage/backupBlob.test.mjs +++ b/services/history-v1/test/acceptance/js/storage/backupBlob.test.mjs @@ -157,6 +157,12 @@ describe('backupBlob', function () { content: Buffer.from('x'.repeat(1000)), storedSize: 29, // zlib.gzipSync(content).byteLength }, + { + name: 'large text file', + // 'ä' is a 2-byte utf-8 character -> 4MB. + content: Buffer.from('ü'.repeat(2 * 1024 * 1024)), + storedSize: 4101, // zlib.gzipSync(content).byteLength + }, { name: 'binary file', content: Buffer.from([0, 1, 2, 3]),