Add initial enzyme test for component TasksTable render

pull/10616/head
Jared Scheib 2018-03-14 17:06:27 -07:00
parent 7f493204db
commit 13da9bec6f
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
import React from 'react'
import {shallow} from 'enzyme'
import TasksTable from 'src/kapacitor/components/TasksTable'
import {source, kapacitorRules} from 'test/resources'
const setup = () => {
const props = {
source,
tasks: kapacitorRules,
onDelete: () => {},
onChangeRuleStatus: () => {}
}
const wrapper = shallow(<TasksTable {...props} />)
return {
wrapper,
props
}
}
describe('Kapacitor.Components.TasksTable', () => {
afterEach(() => {
jest.clearAllMocks()
})
describe('rendering', () => {
it('renders the TasksTable', () => {
const {wrapper} = setup()
expect(wrapper.exists()).toBe(true)
})
})
})