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.
Port spec for Clockpicker (buefy#74)
* test(lib): update Clockpicker spec - Updates the unit tests (spec) of `Clockpicker` so that they can work with `@vue/test-utils` V2: - Awaits `wrapper.setProps` to make sure the subsequent tests verify the updated state. - Replaces direct data modification with `wrapper.setData` and awaits it to make sure the subsequent tests verify the updated state. - Replaces `wrapper.name()` with `wrapper.vm.$options.name` because `wrapper.name` no longer exists in `@vue/test-utils` V2. - Replaces the test on `wrapper.isVueInstance()` with presence of `wrapper.vm` because `wrapper.isVueInstance` no longer exists in `@vue/test-utils` V2. - Replaces `propsData` option for `shallowMount` with `props` because `propsData` might be deprecated in the future. - Refreshes the snapshot. Prevents `b-dropdown` from becoming a stub to reproduce a snapshot closer to the legacy one, because default slots in a stub are no longer rendered on `@vue/test-utils` V2. I did not find any problems in the updated snapshot. issue ntohq#1 * test(lib): update ClockpickerFace spec - Updates the unit tests of `ClockpickerFace` so that they can work with `@vue/test-utils` V2: - Awaits `wrapper.setProps` to make sure the subsequent tests verify the updated state. - Replaces direct data modification with `wrapper.setData` and awaits it to make sure the subsequent tests verify the updated state. - Replaces `wrapper.name()` with `wrapper.vm.$options.name` because `wrapper.name` no longer exists in `@vue/test-utils` V2. - Replaces the test on `wrapper.isVueInstance()` with presence of `wrapper.vm` because `wrapper.isVueInstance` no longer exists in `@vue/test-utils` V2. - Replaces `propsData` option for `shallowMount` with `props` because `propsData` might be deprecated in the future. - Refreshes the snapshot. I did not find any problems in the updated snapshot. issue ntohq#1
- Loading branch information
Showing
4 changed files
with
80 additions
and
59 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
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