Bound browser upload identity memory

This commit is contained in:
ms2k 2026-07-20 04:16:13 +09:00
commit 4d31c441d0

View file

@ -24,6 +24,15 @@ test('Svelte components own neither HTTP nor browser persistence policy', async
]);
});
test('upload identity never buffers or digests a complete File', async () => {
const sources = await sourceFiles('src');
for (const file of sources) {
const source = await readFile(file, 'utf8');
assert.doesNotMatch(source, /\bfile\.arrayBuffer\s*\(/i, file);
assert.doesNotMatch(source, /\bcrypto\.subtle\.digest\s*\(/i, file);
}
});
async function sourceFiles(directory) {
const entries = await readdir(directory, { withFileTypes: true });
return (