Skip to content

Commit

Permalink
test: remove non-nested medias from test
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkness committed Oct 26, 2020
1 parent 1b000fe commit f0384a8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/__test__/Media.test.tsx
Expand Up @@ -534,10 +534,6 @@ describe("Media", () => {
it("only renders one element when Media is nested within Media", () => {
const query = renderer.create(
<MediaContextProvider>
<Media at="extra-small">
<span className="extra-small" />
</Media>

<Media at="medium">
<Media at="extra-small">
<span className="extra-small" />
Expand All @@ -549,20 +545,16 @@ describe("Media", () => {
<span className="large" />
</Media>
</Media>

<Media at="large">
<span className="large" />
</Media>
</MediaContextProvider>
)

expect(
query.root.findAllByProps({ className: "extra-small" }, { deep: true })
.length
).toBe(1)
).toBe(0)
expect(
query.root.findAllByProps({ className: "large" }, { deep: true }).length
).toBe(1)
).toBe(0)
expect(
query.root.findAllByProps({ className: "medium" }, { deep: true })
.length
Expand Down

0 comments on commit f0384a8

Please sign in to comment.