Skip to content

Commit f5d4a0f

Browse files
38elementseddyerburgh
authored andcommitted
fix(types): add render() (#618)
1 parent 528d637 commit f5d4a0f

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: packages/server-test-utils/types/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ interface VueTestUtilsConfigOptions {
5555

5656
export declare let config: VueTestUtilsConfigOptions
5757

58+
export declare function render<V extends Vue> (component: VueClass<V>, options?: ThisTypedMountOptions<V>): string
59+
export declare function render<V extends Vue> (component: ComponentOptions<V>, options?: ThisTypedMountOptions<V>): string
60+
export declare function render (component: FunctionalComponentOptions, options?: MountOptions<Vue>): string
61+
5862
export declare function renderToString<V extends Vue> (component: VueClass<V>, options?: ThisTypedMountOptions<V>): string
5963
export declare function renderToString<V extends Vue> (component: ComponentOptions<V>, options?: ThisTypedMountOptions<V>): string
6064
export declare function renderToString (component: FunctionalComponentOptions, options?: MountOptions<Vue>): string

Diff for: packages/server-test-utils/types/test/renderToString.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
import Vuex from 'vuex'
2-
import { renderToString, config } from '../'
2+
import { render, renderToString, config } from '../'
33
import { normalOptions, functionalOptions, Normal, ClassComponent } from './resources'
44

55
const store = new Vuex.Store({})
66

7+
render(
8+
{
9+
template: '<p>foo</p>'
10+
},
11+
{
12+
attachToDocument: true,
13+
scopedSlots: {
14+
foo: `<div>Foo</div>`
15+
},
16+
sync: false
17+
}
18+
)
19+
720
renderToString(ClassComponent, {
821
mocks: {
922
$store: store

0 commit comments

Comments
 (0)