From 41cb59bbe00a6bc0a9d0e83e7e0adbe4d1595a75 Mon Sep 17 00:00:00 2001 From: Sam Menza Date: Fri, 15 Jan 2021 15:16:08 -0500 Subject: [PATCH] Added unit tests --- tests/testing/unit/harness/assertionTemplate.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/testing/unit/harness/assertionTemplate.tsx b/tests/testing/unit/harness/assertionTemplate.tsx index a6d94e0a7..e88c0ef1f 100644 --- a/tests/testing/unit/harness/assertionTemplate.tsx +++ b/tests/testing/unit/harness/assertionTemplate.tsx @@ -313,6 +313,18 @@ describe('assertionTemplate', () => { h.expect(childAssertion); }); + it('can set siblings after with insert siblings factory function', () => { + const h = harness(() => w(MyWidget, { after: true })); + const childAssertion = baseAssertion.insertSiblings('ul', [v('span', ['after'])]); + h.expect(childAssertion); + }); + + it('can set siblings before with insert siblings factory function', () => { + const h = harness(() => w(MyWidget, { before: true })); + const childAssertion = baseAssertion.insertSiblings('ul', [v('span', ['before'])], 'before'); + h.expect(childAssertion); + }); + it('can be used with tsx', () => { const h = harness(() => ); const propertyAssertion = tsxAssertion.setProperty('~li-one', 'foo', 'b');