diff --git a/packages/core/tests/stacks.test.mjs b/packages/core/tests/stacks.test.mjs index 6c0f369d24c..416dfc45743 100644 --- a/packages/core/tests/stacks.test.mjs +++ b/packages/core/tests/stacks.test.mjs @@ -218,6 +218,16 @@ describe('Stacks', () => { expect(stack.bottomRight.x).to.equal(7.0710678118654755) expect(stack.bottomRight.y).to.equal(0) }) + + it('Should handle an empty stack', () => { + const stack = new Stack('test') + stack.context = { settings: [{ margin: 0 }] } + stack.home() + expect(stack.topLeft.x).to.equal(0) + expect(stack.topLeft.y).to.equal(0) + expect(stack.bottomRight.x).to.equal(0) + expect(stack.bottomRight.y).to.equal(0) + }) }) it('Should get the anchor for the stack', () => {