Skip to content

Commit

Permalink
fix: codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregcop1 committed Feb 14, 2018
1 parent c1c5199 commit 0f1aa89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tree-node/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { shallow } from 'enzyme'
import { spy } from 'sinon'
import TreeNode from './index'

const hasGap = (wrapper) => {
return !!wrapper.find('li').first().props().style.paddingLeft;
}

test('renders tree node', t => {
const node = {
_id: '0-0-0',
Expand All @@ -26,7 +30,7 @@ test('renders tree node', t => {
t.true(wrapper.find('.toggle').exists())
t.true(wrapper.find('label').exists())
t.true(wrapper.find('.checkbox-item').exists())
t.true(!!wrapper.find('li').first().props().style.paddingLeft)
t.true(hasGap(wrapper))
})

test('notifies checkbox changes', t => {
Expand Down Expand Up @@ -73,5 +77,5 @@ test('remove gap during search', t => {

const wrapper = shallow(<TreeNode node={node} searchModeOn={true} />)

t.false(!!wrapper.find('li').first().props().style.paddingLeft)
t.false(hasGap(wrapper))
})

0 comments on commit 0f1aa89

Please sign in to comment.