diff --git a/ui/test/kapacitor/components/KapacitorRules.test.tsx b/ui/test/kapacitor/components/KapacitorRules.test.tsx index ee7813ee76..6145682ea2 100644 --- a/ui/test/kapacitor/components/KapacitorRules.test.tsx +++ b/ui/test/kapacitor/components/KapacitorRules.test.tsx @@ -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() @@ -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) { diff --git a/ui/test/kapacitor/components/KapacitorRulesTable.test.tsx b/ui/test/kapacitor/components/KapacitorRulesTable.test.tsx index e47d5d1a1d..f388e2a67f 100644 --- a/ui/test/kapacitor/components/KapacitorRulesTable.test.tsx +++ b/ui/test/kapacitor/components/KapacitorRulesTable.test.tsx @@ -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() - const checkbox = wrapper.find({type:'checkbox'}) + const checkbox = wrapper.find({type: 'checkbox'}) checkbox.simulate('change') expect(props.onChangeRuleStatus).toHaveBeenCalledTimes(1) diff --git a/ui/test/kapacitor/components/TasksTable.test.tsx b/ui/test/kapacitor/components/TasksTable.test.tsx index 7b4c1e4380..ed2d638315 100644 --- a/ui/test/kapacitor/components/TasksTable.test.tsx +++ b/ui/test/kapacitor/components/TasksTable.test.tsx @@ -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() - const checkbox = wrapper.find(({type:'checkbox'})) + const checkbox = wrapper.find({type: 'checkbox'}) checkbox.simulate('change') expect(props.onChangeRuleStatus).toHaveBeenCalledTimes(1)