diff --git a/test/index.test.js b/test/index.test.js index 2af58ca..4e6ff5a 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -377,13 +377,16 @@ test('shoots default scaled confetti', async t => { t.context.buffer = await confettiImage(page, { colors: ['#0000ff'], shapes: ['circle'], - particleCount: 10 + particleCount: 1, + startVelocity: 0, + gravity: 0, + flat: true }); t.context.image = await removeOpacity(t.context.buffer); const pixels = await totalPixels(t.context.image); - t.is(pixels > 100 && pixels < 500, true); + t.is(pixels, 124); }); test('shoots larger scaled confetti', async t => { @@ -393,13 +396,16 @@ test('shoots larger scaled confetti', async t => { colors: ['#0000ff'], shapes: ['circle'], scalar: 10, - particleCount: 10 + particleCount: 1, + startVelocity: 0, + gravity: 0, + flat: true }); t.context.image = await removeOpacity(t.context.buffer); const pixels = await totalPixels(t.context.image); - t.is(pixels > 2000, true); + t.is(pixels, 11476); }); test('shoots confetti to the left', async t => {