Skip to content

Commit 86ce4f2

Browse files
author
Josh Habdas
committed
Make use of chai's lengthOf assertion and simplify test
1 parent 36956a6 commit 86ce4f2

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

test/specs/elements/Segment/Segments-test.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ describe('Segments', () => {
1919
});
2020

2121
it('renders expected number of children', () => {
22-
const [component] = render(
22+
render(
2323
<Segments>
2424
<Segment>Top</Segment>
2525
<Segment>Middle</Segment>
2626
<Segment>Bottom</Segment>
2727
</Segments>
28-
).scryClass('sd-segments');
29-
30-
expect(
31-
component.querySelectorAll('.sd-segment').length
32-
).to.equal(3);
28+
)
29+
.scryClass('sd-segment')
30+
.should.have.a.lengthOf(3);
3331
});
3432
});

0 commit comments

Comments
 (0)