Make tslint happy for tests
parent
8d915cebc3
commit
385c892f6a
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue