Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.67 KB

File metadata and controls

27 lines (15 loc) · 1.67 KB

This plugin provides the following rules:

Checks that Wrapper functions which trigger component updates are awaited.

This rule helps test writers make sure they have waited for any component updates to complete before trying to assert on them, preventing "but nothing happened!" syndrome.

Checks that mount and shallowMount options are valid for the current version of VTU.

This rule reports when mount options that are deprecated or unsupported in the current version of VTU are used.

Checks that Wrapper methods are called with appropriate selectors.

This rule reports Wrapper find* and get* calls which are using improper selectors for their return types. For example, find should be called with a CSS selector and should be expected to return a DOM element, and findComponent should be called with a component selector and should be expected to return a Vue component.

Additionally, this rule reports wrapper.vm usages which are chained off an improper selector function. For example, wrapper.find('div') always returns a DOM element in VTU 2, making wrapper.find('div').vm an incorrect usage.

Checks that no Wrapper functions which are deprecated are used. This rule helps with upgrading VTU from v1 to v2 by warning of function calls which are deprecated and have been removed in v2. This rule reports Wrapper instance method calls which are deprecated in @vue/test-utils v2.