Skip to content

Instantly share code, notes, and snippets.

@dvallin
Created November 29, 2017 16:46
Show Gist options
  • Save dvallin/7625b733fedbc44f84798d45c59e5745 to your computer and use it in GitHub Desktop.
Save dvallin/7625b733fedbc44f84798d45c59e5745 to your computer and use it in GitHub Desktop.
import TodoListItem from '@/components/TodoListItem'
import {Task} from "@/domain/Task";
import {mount} from 'vue-test-utils'
describe('TodoListItem.vue', () => {
it('renders snapshots', () => {
const cmp = mount(TodoListItem, {
propsData: {
task: new Task("Some Title")
}
});
expect(cmp.element).toMatchSnapshot();
expect(cmp.find('label').text()).toBe("Some Title");
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment