@@ -142,7 +142,7 @@ export default class Wrapper implements BaseWrapper {
142142 * Calls destroy on vm
143143 */
144144 destroy ( ) : void {
145- if ( ! this . isVueInstance ( ) && ! this . isFunctionalComponent ) {
145+ if ( ! this . vm && ! this . isFunctionalComponent ) {
146146 throwError (
147147 `wrapper.destroy() can only be called on a Vue instance or ` +
148148 `functional component.`
@@ -153,7 +153,7 @@ export default class Wrapper implements BaseWrapper {
153153 this . element . parentNode . removeChild ( this . element )
154154 }
155155
156- if ( this . isVueInstance ( ) ) {
156+ if ( this . vm ) {
157157 // $FlowIgnore
158158 this . vm . $destroy ( )
159159 throwIfInstancesThrew ( this . vm )
@@ -370,7 +370,7 @@ export default class Wrapper implements BaseWrapper {
370370 */
371371 isVisible ( ) : boolean {
372372 warnDeprecated (
373- 'isEmpty ' ,
373+ 'isVisible ' ,
374374 `Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible`
375375 )
376376 let element = this . element
@@ -428,7 +428,7 @@ export default class Wrapper implements BaseWrapper {
428428 overview ( ) : void {
429429 warnDeprecated ( `overview` )
430430
431- if ( ! this . isVueInstance ( ) ) {
431+ if ( ! this . vm ) {
432432 throwError ( `wrapper.overview() can only be called on a Vue instance` )
433433 }
434434
@@ -530,11 +530,6 @@ export default class Wrapper implements BaseWrapper {
530530 * @deprecated
531531 */
532532 setChecked ( checked : boolean = true ) : Promise < * > {
533- warnDeprecated (
534- `setChecked` ,
535- 'When you migrate to VTU 2, use setValue instead.'
536- )
537-
538533 if ( typeof checked !== 'boolean' ) {
539534 throwError ( 'wrapper.setChecked() must be passed a boolean' )
540535 }
@@ -582,11 +577,6 @@ export default class Wrapper implements BaseWrapper {
582577 * @deprecated
583578 */
584579 setSelected ( ) : Promise < void > {
585- warnDeprecated (
586- `setSelected` ,
587- 'When you migrate to VTU 2, use setValue instead.'
588- )
589-
590580 const tagName = this . element . tagName
591581
592582 if ( tagName === 'SELECT' ) {
@@ -642,7 +632,7 @@ export default class Wrapper implements BaseWrapper {
642632 setMethods ( methods : Object ) : void {
643633 warnDeprecated ( `setMethods` )
644634
645- if ( ! this . isVueInstance ( ) ) {
635+ if ( ! this . vm ) {
646636 throwError ( `wrapper.setMethods() can only be called on a Vue instance` )
647637 }
648638 Object . keys ( methods ) . forEach ( key => {
0 commit comments