Created
July 21, 2017 16:13
-
-
Save eddyerburgh/c4771de9f0fdde1ef995a2cadd5c00ba 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 { shallow } from 'vue-test-utils' | |
import ComponentWithChildren from '@/components/ComponentWithSlots' | |
import ChildComponent from '@/components/AnotherComponent' | |
// shallow mount the component | |
const wrapper = mount(ComponentWithChildren) | |
// you can still find the child component, but it doesn't render any nodes | |
const childComponent = wrapper.find(ChildComponent) | |
// make assertions | |
expect(childComponent.hasProp('foo', 'bar')).to.equal(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment