Skip to content

Commit

Permalink
adding flat test
Browse files Browse the repository at this point in the history
  • Loading branch information
catdad committed Oct 2, 2023
1 parent 8505b25 commit 852975b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,24 @@ test('shoots confetti to the right', async t => {
t.deepEqual(pixels.left, ['#ffffff']);
});

test('shoots flat confetti', async t => {
const page = t.context.page = await fixturePage();

// these parameters should create an image
// that is the same every time
t.context.buffer = await confettiImage(page, {
startVelocity: 0,
gravity: 0,
scalar: 20,
flat: 1,
shapes: ['circle'],
colors: ['ff0000']
});
t.context.image = await readImage(t.context.buffer);

t.is(t.context.image.hash(), '8E0802208w0');
});

/*
* Operational tests
*/
Expand Down

0 comments on commit 852975b

Please sign in to comment.