testing-library / svelte-testing-library

:chipmunk: Simple and complete Svelte DOM testing utilities that encourage good testing practices
https://testing-library.com/docs/svelte-testing-library/intro
MIT License
615 stars 33 forks source link

fix(types): correct type annotation for `act` #288

Closed mcous closed 8 months ago

mcous commented 8 months ago

The implementation of act() requires a function, but the type annotation says it takes either a function or a Promise.

After checking out the history, I found this mismatch was created by #54, which added both the type annotation and implementation for act. This leads me to think the best path forward now is to simply adjust the type annotation to match reality, rather than updating the implementation to support a Promise.

Closes #134

yanick commented 8 months ago

Sounds sane! :+1:

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 4.0.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: