Skip to content

Commit

Permalink
Added unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samends committed Jan 15, 2021
1 parent d31d086 commit 41cb59b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testing/unit/harness/assertionTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => <MyWidget toggleProperty={true} />);
const propertyAssertion = tsxAssertion.setProperty('~li-one', 'foo', 'b');
Expand Down

0 comments on commit 41cb59b

Please sign in to comment.