Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 691 Bytes

config.md

File metadata and controls

26 lines (17 loc) · 691 Bytes

Config

vue-test-utils includes a config object to defined options used by vue-test-utils.

vue-test-utils Config Options

stubs

  • type: Object
  • default: { transition: TransitionStub, 'transition-group': TransitionGroupStub }

The stub stored in config.stubs is used by default.
Stubs to use in components. These are overwritten by stubs passed in the mounting options.

When passing stubs as an array in the mounting options, config.stubs are converted to an array, and will stub components with a basic component that returns <!---->.

Example:

import VueTestUtils from '@vue/test-utils'

VueTestUtils.config.stubs['my-component'] = '<div />'