Skip to content

Commit

Permalink
fix(test): bundles must be less than 0.5 MB
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev authored and amessbee committed May 10, 2024
1 parent e925caf commit 3fe9813
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contract/test/test-build-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ test.only('proposal builder generates compressed bundles less than 1MB', async t
const buffer = await t.context.compressFile(bundle);
t.assert(buffer);
const sizeInMb = buffer.length / (1024 * 1024);
t.assert(sizeInMb < 1, 'Compressed bundle is less than 1MB');
// JSON RPC hex encoding doubles the size
t.assert(sizeInMb * 2 < 1, 'Compressed bundle is less than 0.5MB');
t.log({
bundleId: bundle.split('cache/')[1].split('.json')[0],
compressedSize: `${sizeInMb} MB`,
Expand Down

0 comments on commit 3fe9813

Please sign in to comment.