Make tslint happy for tests

pull/10616/head
Jared Scheib 2018-03-22 15:51:54 -07:00
parent 8d915cebc3
commit 385c892f6a
3 changed files with 8 additions and 6 deletions

View File

@ -79,7 +79,9 @@ describe('Kapacitor.Containers.KapacitorRules', () => {
const containsAnyDuplicate = arr => _.uniq(arr).length !== arr.length
let wrapper, rulesRows, tasksRows
let wrapper
let rulesRows
let tasksRows
beforeEach(() => {
wrapper = shallow(<KapacitorRules {...props} />)
@ -118,7 +120,7 @@ describe('Kapacitor.Containers.KapacitorRules', () => {
const correspondingRows = []
rulesRows.forEach(ruleRow => {
let taskRow = tasksRows
const taskRow = tasksRows
.filter(t => t.rule.id === ruleRow.rule.id)
.pop()
if (taskRow) {

View File

@ -12,7 +12,7 @@ describe('Kapacitor.Components.KapacitorRulesTable', () => {
source,
rules: kapacitorRules,
onDelete: () => {},
onChangeRuleStatus: () => {}
onChangeRuleStatus: () => {},
}
it('renders KapacitorRulesTable', () => {
@ -47,7 +47,7 @@ describe('Kapacitor.Containers.KapacitorRulesTable.RuleRow', () => {
it('calls onChangeRuleStatus when checkbox is effectively clicked', () => {
const wrapper = shallow(<RuleRow {...props} />)
const checkbox = wrapper.find({type:'checkbox'})
const checkbox = wrapper.find({type: 'checkbox'})
checkbox.simulate('change')
expect(props.onChangeRuleStatus).toHaveBeenCalledTimes(1)

View File

@ -12,7 +12,7 @@ describe('Kapacitor.Components.TasksTable', () => {
source,
tasks: kapacitorRules,
onDelete: () => {},
onChangeRuleStatus: () => {}
onChangeRuleStatus: () => {},
}
it('renders TasksTable', () => {
@ -33,7 +33,7 @@ describe('Kapacitor.Components.TasksTable', () => {
it('calls onChangeRuleStatus when checkbox is effectively clicked', () => {
const wrapper = shallow(<TaskRow {...props} />)
const checkbox = wrapper.find(({type:'checkbox'}))
const checkbox = wrapper.find({type: 'checkbox'})
checkbox.simulate('change')
expect(props.onChangeRuleStatus).toHaveBeenCalledTimes(1)