Skip to content

Commit d596dbd

Browse files
38elementseddyerburgh
authored andcommitted
refactor: remove Wrapper.isVm (#778)
1 parent d93b692 commit d596dbd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: packages/test-utils/src/vue-wrapper.js

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default class VueWrapper extends Wrapper implements BaseWrapper {
2828
setWatchersToSync(vm)
2929
orderWatchers(vm)
3030
}
31-
this.isVm = true
3231
this.isFunctionalComponent = vm.$options._isFunctionalContainer
3332
this._emitted = vm.__emitted
3433
this._emittedByOrder = vm.__emittedByOrder

Diff for: packages/test-utils/src/wrapper.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default class Wrapper implements BaseWrapper {
2727
+vm: Component | void;
2828
_emitted: { [name: string]: Array<Array<any>> };
2929
_emittedByOrder: Array<{ name: string, args: Array<any> }>;
30-
isVm: boolean;
3130
+element: Element;
3231
update: Function;
3332
+options: WrapperOptions;
@@ -446,7 +445,7 @@ export default class Wrapper implements BaseWrapper {
446445
* Checks if wrapper is a vue instance
447446
*/
448447
isVueInstance (): boolean {
449-
return !!this.isVm
448+
return !!this.vm
450449
}
451450

452451
/**
@@ -640,7 +639,7 @@ export default class Wrapper implements BaseWrapper {
640639
`functional component`
641640
)
642641
}
643-
if (!this.isVm) {
642+
if (!this.vm) {
644643
throwError(
645644
`wrapper.setProps() can only be called on a Vue ` +
646645
`instance`

0 commit comments

Comments
 (0)