Skip to content

Commit

Permalink
update tests for @testing-library/vue, from dom (DefinitelyTyped#45782)
Browse files Browse the repository at this point in the history
waitForElementToBeRemoved had the wrong return type, and it got fixed in
testing-library/dom-testing-library#631

This PR updates @testing-library/vue, which depends on
@testing-library/dom.
  • Loading branch information
sandersn authored and danielrearden committed Sep 22, 2020
1 parent 0d0b0c8 commit c718d2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/testing-library__vue/testing-library__vue-tests.ts
Expand Up @@ -132,8 +132,8 @@ lib.wait(() => { throw new Error("nope"); }, {timeout: 3000, interval: 100});
lib.waitForDomChange({container: select, timeout: 3000, mutationObserverOptions: {subtree: false}});
lib.waitForElement(() => input); // $ExpectType Promise<HTMLInputElement>
lib.waitForElement(() => option, {container: select, timeout: 3000, mutationObserverOptions: {subtree: false}}); // $ExpectType Promise<HTMLOptionElement>
lib.waitForElementToBeRemoved(() => input); // $ExpectType Promise<HTMLInputElement>
lib.waitForElementToBeRemoved(() => option, {container: select, timeout: 3000, mutationObserverOptions: {subtree: false}}); // $ExpectType Promise<HTMLOptionElement>
lib.waitForElementToBeRemoved(() => input); // $ExpectType Promise<void>
lib.waitForElementToBeRemoved(() => option, {container: select, timeout: 3000, mutationObserverOptions: {subtree: false}}); // $ExpectType Promise<void>

// Reexports utilities from dom-testing-library
lib.buildQueries((el: HTMLElement) => [el], (_: HTMLElement) => "something", (_: HTMLElement) => "error");
Expand Down

0 comments on commit c718d2f

Please sign in to comment.