Created
January 26, 2018 11:13
-
-
Save lmiller1990/00e95ac63a2e8b62cf76573679a4a463 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
import { shallow } from 'vue-test-utils' | |
import CreateDescription from './CreateDescription' | |
describe('CreateDescription', () => { | |
it('emits a input event with the entered value', () => { | |
const wrapper = shallow(CreateDescription, { | |
propsData: { | |
value: '' | |
} | |
}) | |
wrapper.find('textarea').element.value = 'Post' | |
wrapper.find('textarea').trigger('input') | |
expect(wrapper.emitted().input[0][0]).toEqual('Post') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment