From 80b816e3d1623856ebcb2902e4fae53b1d5bedfd Mon Sep 17 00:00:00 2001 From: Mario Aleo Date: Mon, 22 Jul 2019 17:54:18 +0200 Subject: [PATCH] chore(textarea): fix typos in tests --- packages/textarea/test/lion-textarea.test.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/textarea/test/lion-textarea.test.js b/packages/textarea/test/lion-textarea.test.js index 187a8b523..0e2aebf2d 100644 --- a/packages/textarea/test/lion-textarea.test.js +++ b/packages/textarea/test/lion-textarea.test.js @@ -11,7 +11,7 @@ describe('', () => { expect(el.querySelector('textarea').nodeName).to.equal('TEXTAREA'); }); - it('has a default minRows of 2 and maxRows of 10', async () => { + it('has default minRows and maxRows', async () => { const el = await fixture(``); expect(el.rows).to.equal(2); expect(el.maxRows).to.equal(6); @@ -31,13 +31,13 @@ describe('', () => { const initialHeight = el.offsetHeight; el.modelValue = 'batman\nand\nrobin\nand\ncatwoman'; await el.updateComplete; - const hightWith4TextLines = el.offsetHeight; - expect(hightWith4TextLines > initialHeight).to.equal(true); + const hightWith5TextLines = el.offsetHeight; + expect(hightWith5TextLines > initialHeight).to.equal(true); el.modelValue = 'batman'; await el.updateComplete; const hightWith1Line = el.offsetHeight; - expect(hightWith1Line < hightWith4TextLines).to.equal(true); + expect(hightWith1Line < hightWith5TextLines).to.equal(true); }); it(`starts growing when content is bigger than "rows" @@ -62,10 +62,11 @@ describe('', () => { }); it('stops shrinking after property "rows" is reached', async () => { - const el = await fixture(``); - el.rows = 1; - el.maxRows = 3; - await el.updateComplete; + const el = await fixture( + html` + + `, + ); expect(el.scrollHeight).to.be.equal(el.clientHeight); const oneRowHeight = el.clientHeight;