Skip to content

Commit

Permalink
Dna: Fix test for Dna import :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhnpd committed Aug 27, 2022
1 parent 675ee5a commit 9bea3f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Radio from './loader/Radio'
import ProgressBar from './loader/ProgressBar'
import MagnifyingGlass from './loader/MagnifyingGlass'
import FidgetSpinner from './loader/FidgetSpinner'
import DNA from './loader/Dna'
import Dna from './loader/Dna'
import Discuss from './loader/Discuss'
import ColorRing from './loader/ColorRing'
import Comment from './loader/Comment'
Expand All @@ -42,7 +42,7 @@ export {
ColorRing,
Comment,
Discuss,
DNA,
Dna,
Grid,
FallingLines,
FidgetSpinner,
Expand Down
10 changes: 5 additions & 5 deletions test/loader/Dna.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import { DNA } from '../../src'
import { Dna } from '../../src'
import { render, screen } from '@testing-library/react'

const svgTestId = 'dna-svg'

describe('DNA', () => {
describe('Dna', () => {
test('should render properly with default props', () => {
render(<DNA />)
render(<Dna />)
const component = screen.getByTestId(svgTestId)
expect(component).toBeDefined()
expect(component).toHaveAttribute('aria-label', 'dna-loading')
Expand All @@ -18,7 +18,7 @@ describe('DNA', () => {

test('should render with custom props', () => {
render(
<DNA
<Dna
height={200}
width={200}
ariaLabel="test-aria-label"
Expand All @@ -37,7 +37,7 @@ describe('DNA', () => {
expect(component).toHaveAttribute('width', '200')
})
test('should be hidden when visible is false', () => {
render(<DNA visible={false} />)
render(<Dna visible={false} />)
const element = screen.queryAllByTestId(svgTestId)
expect(element).toEqual([])
})
Expand Down

0 comments on commit 9bea3f0

Please sign in to comment.