-
-
Save dvallin/d76d0da36c8d6dbd8b51dc9f97e3c5fe to your computer and use it in GitHub Desktop.
This file contains 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
import {Actions} from "../../src/store"; | |
//... | |
describe('add task', () => { | |
it('dispatches AddTask action to store', () => { | |
const context = { $store: { dispatch: jest.fn() }, taskTitle: "title" }; | |
NewTaskInput.methods.addTask.bind(context)(); | |
expect(context.$store.dispatch).toHaveBeenCalledWith({ | |
type: Actions.AddTask, | |
title: "title" | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment