This repository has been archived by the owner on Dec 26, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change shallow -> shallowMount (#9)
- Loading branch information
1 parent
722680c
commit cf27fcf
Showing
4 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { shallow } from '@vue/test-utils' | ||
import { shallowMount } from '@vue/test-utils' | ||
import Message from '@/components/Message.vue' | ||
|
||
describe('Message.vue', () => { | ||
it('renders props.msg when passed', () => { | ||
const msg = 'new message' | ||
const wrapper = shallow(Message, { | ||
const wrapper = shallowMount(Message, { | ||
propsData: { msg } | ||
}) | ||
expect(wrapper.text()).toBe(msg) | ||
}) | ||
|
||
it('renders default message if not passed a prop', () => { | ||
const defaultMessage = 'default message' | ||
const wrapper = shallow(Message) | ||
const wrapper = shallowMount(Message) | ||
expect(wrapper.text()).toBe(defaultMessage) | ||
}) | ||
}) |
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