forked from buefy/buefy
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test(lib): update Button spec - Updates the unit tests (spec) of `Button` so that they can work with `@vue/test-utils` V2. - Replaces `wrapper.name()` with `wrapper.vm.$options.name` because `wrapper.name` no longer exists in V2. - Replaces the test of `wrapper.isVueInstance()` with that of presence of `wrapper.vm` because `wrapper.isVueInstance` no longer exists in V2. - Replaces `listeners.click` in the options for `shallowMount` with `props.onClick` because the interface of the options has changed in V2. - Replaces `wrapper.contains` with a combination of `wrapper.find` and `exists` because `wrapper.contains` no longer exists in V2. - Awaits `wrapper.setProps` to make sure new properties are applied before testing subsequent assertions. - Updates the snapshot. I did not see any problem with the new snapshot. issue ntohq#1 * chore(lib): remove comment on Button.spec
- Loading branch information
Showing
2 changed files
with
25 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`BButton render correctly 1`] = ` | ||
<button type="button" class="button"> | ||
<!----> | ||
<!----> | ||
<!----></button> | ||
<button class="button" type="button"> | ||
<!--v-if--> | ||
<!--v-if--> | ||
<!--v-if--> | ||
</button> | ||
`; |