Created
May 28, 2019 18:00
-
-
Save artberri/c6e9ecce7a402c6297b0d151b5e335b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
describe('On toggle checkbox clicked', () => { | |
describe('when it is initially active', () => { | |
beforeEach(() => { | |
view.todo = activeTodo; | |
presenter.attach(view); | |
jest.clearAllMocks(); | |
}); | |
test('completes the todo', () => { | |
presenter.toggleTodo(); | |
expect(todosState.state[0].isCompleted).toBe(true); | |
}); | |
test('checks the checkbox', () => { | |
presenter.toggleTodo(); | |
expect(view.completeTodo).toHaveBeenCalled(); | |
}); | |
}); | |
}); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment