https://github.com/testing-library/svelte-testing-library/blob/5ae96a77c7c4f80183ed89908482dc4b88059ae6/src/pure.js#L94 The code above should check if `fn` is a function before calling it, otherwise should be used as a Promise