Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/preact-render-spy.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ class FindWrapper {
);
}

childAt(index) {
return this.children().at(index);
}

exists() {
verifyFoundNodes(this);
return this.length > 0;
Expand Down
9 changes: 0 additions & 9 deletions src/shared-render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,6 @@ const sharedTests = (name, func) => {
expect(context.contains(<DivChildren><div class="first" /><span class="second"><div class="third" /></span></DivChildren>)).toBeTruthy();
});

it(`${name}: childAt() returns child at specific index`, () => {
const context = func(<DivChildren><div class="first" /><div class="second" /><div class="third" /></DivChildren>);
expect(context.childAt(0).attr('class')).toBe('first');
expect(context.childAt(1).attr('class')).toBe('second');
expect(context.childAt(2).attr('class')).toBe('third');
expect(() => context.childAt(3).attr('class')).toThrow();
expect(() => context.find('NotExistingComponent').childAt(0)).toThrow();
});

it(`${name}: children() returns children`, () => {
const context = func(<DivChildren><div class="first" /><div class="second" /><div class="third" /></DivChildren>);
expect(context.children().length).toBe(3);
Expand Down