Skip to content

Commit

Permalink
Feat #30 - Add test for Table Component
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-dassana committed Aug 11, 2020
1 parent da6aa1f commit fecab62
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/Table/Table.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import Table, { TableProps } from './Table'
import { User, tableData } from './Table.stories'
import { shallow, ShallowWrapper } from 'enzyme'

const mockData = tableData

describe('Table', () => {
it('renders', () => {
type WrapperType = ShallowWrapper<TableProps<User>>
const wrapper: WrapperType = shallow(<Table {...mockData} />)
expect(wrapper).toHaveLength(1)
})
})

0 comments on commit fecab62

Please sign in to comment.