Bound browser upload identity memory
This commit is contained in:
parent
0c2d992224
commit
4d31c441d0
1 changed files with 544 additions and 5 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in a new issue