Skip to content

Commit

Permalink
chore(exists): move exists check to VueWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
xanf committed Jun 28, 2022
1 parent 49e046e commit 4afcab8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/baseWrapper.ts
Expand Up @@ -248,7 +248,7 @@ export default abstract class BaseWrapper<ElementType extends Node>
}

exists() {
return !this.getCurrentComponent()?.isUnmounted
return true
}

get<K extends keyof HTMLElementTagNameMap>(
Expand Down
4 changes: 4 additions & 0 deletions src/vueWrapper.ts
Expand Up @@ -107,6 +107,10 @@ export class VueWrapper<
return this.vm.$
}

exists() {
return !this.getCurrentComponent().isUnmounted
}

findAll<K extends keyof HTMLElementTagNameMap>(
selector: K
): DOMWrapper<HTMLElementTagNameMap[K]>[]
Expand Down

0 comments on commit 4afcab8

Please sign in to comment.