Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jontewks committed Mar 3, 2016
1 parent b955925 commit 954e44c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/todos/test/components/Link.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Components', () => {
describe('Link', () => {
it('Returns a span with children if active', () => {
const output = setup({
active: true,
active: true
})
expect(output.type).toBe('span')
expect(output.props.children).toBe('Click me!')
Expand Down
22 changes: 11 additions & 11 deletions examples/todos/test/components/Todo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import Todo from '../../components/Todo'
function setup(propsOveride) {
const renderer = TestUtils.createRenderer()
renderer.render(
<Todo
onClick={() => {}}
completed={false}
text={'Call Jon Tewksbury'}
{...propsOveride}
/>
<Todo
onClick={() => {}}
completed={false}
text={'Call Jon Tewksbury'}
{...propsOveride}
/>
)
return renderer.getRenderOutput()
}
Expand All @@ -25,11 +25,11 @@ describe('Components', () => {
})

it('Fires onClick passed in', () => {
let hasFired = false
let hasFired = false
const output = setup({
onClick() {
hasFired = true
},
onClick() {
hasFired = true
}
})
output.props.onClick()

Expand All @@ -41,7 +41,7 @@ describe('Components', () => {
expect(notCompleted.props.style.textDecoration).toBe('none')

const completed = setup({
completed: true,
completed: true
})
expect(completed.props.style.textDecoration).toBe('line-through')
})
Expand Down
28 changes: 15 additions & 13 deletions examples/todos/test/components/TodoList.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ import Todo from '../../components/Todo'
function setup(propsOveride) {
const renderer = TestUtils.createRenderer()
renderer.render(
<TodoList
todos={[{
id: 1,
completed: false,
text: 'Request a raise',
}]}
onTodoClick={() => {}}
{...propsOveride}
/>
<TodoList
todos={[
{
id: 1,
completed: false,
text: 'Request a raise'
}
]}
onTodoClick={() => {}}
{...propsOveride}
/>
)
return renderer.getRenderOutput()
}
Expand All @@ -32,11 +34,11 @@ describe('Components', () => {
})

it('Passes onTodoClick to each child', () => {
let hasFired = false
let hasFired = false
const output = setup({
onTodoClick() {
hasFired = true
},
onTodoClick() {
hasFired = true
}
})

const children = output.props.children
Expand Down

0 comments on commit 954e44c

Please sign in to comment.