diff --git a/docs/en/README.md b/docs/en/README.md index 17be425d7..3ab665ced 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -23,6 +23,7 @@ Vue Test Utils is the official unit testing utility library for Vue.js. * [Mounting Options](api/options.md) - [context](api/options.md#context) - [slots](api/options.md#slots) + - [scopedSlots](api/options.md#scopedslots) - [stubs](api/options.md#stubs) - [mocks](api/options.md#mocks) - [localVue](api/options.md#localvue) diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index f743a46a2..99f0a09c9 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -19,6 +19,7 @@ * [Mounting Options](api/options.md) - [context](api/options.md#context) - [slots](api/options.md#slots) + - [scopedSlots](api/options.md#scopedslots) - [stubs](api/options.md#stubs) - [mocks](api/options.md#mocks) - [localVue](api/options.md#localvue) diff --git a/docs/en/api/README.md b/docs/en/api/README.md index 879f38c01..ed8fe907c 100644 --- a/docs/en/api/README.md +++ b/docs/en/api/README.md @@ -7,6 +7,7 @@ * [Mounting Options](./options.md) - [context](./options.md#context) - [slots](./options.md#slots) + - [scopedSlots](./options.md#scopedslots) - [stubs](./options.md#stubs) - [mocks](./options.md#mocks) - [localVue](./options.md#localvue) diff --git a/docs/en/api/options.md b/docs/en/api/options.md index 3b4828578..9370fa8d8 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -6,6 +6,7 @@ Options for `mount` and `shallow`. The options object can contain both Vue Test - [`context`](#context) - [`slots`](#slots) +- [`scopedSlots`](#scopedslots) - [`stubs`](#stubs) - [`mocks`](#mocks) - [`localVue`](#localvue) @@ -66,7 +67,33 @@ You can pass text to `slots`. There is a limitation to this. This does not support PhantomJS. -Please use [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer). +You can use [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer) as an alternative. + +### `scopedSlots` + +- type: `{ [name: string]: string }` + +Provide an object of scoped slots contents to the component. The key corresponds to the slot name. The value can be a template string. + +There are three limitations. + +* This option is only supported in vue@2.5+. + +* You can not use `