vitest
vitest copied to clipboard
Type `Promisify<...>` has no call signatures
Describe the bug
I'm trying to reproduce resolves example. The Chai style assertion throws strange Typescript error:

Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-52dmdx?file=test/basic.test.ts
System Info
System:
OS: Linux 6.1 Fedora Linux 37 (Workstation Edition)
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 5.08 GB / 15.46 GB
Container: Yes
Shell: 5.2.15 - /bin/bash
Binaries:
Node: 18.0.0 - ~/.volta/tools/image/node/18.0.0/bin/node
npm: 8.6.0 - ~/.volta/tools/image/node/18.0.0/bin/npm
Browsers:
Chrome: 110.0.5481.77
npmPackages:
vite: ^4.1.1 => 4.1.1
vitest: ^0.28.5 => 0.28.5
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
This appears to still be a problem and it is quite annoying because it makes using the Chai API with promises very inconvenient in TypeScript projects.
Together with https://github.com/vitest-dev/vitest/issues/3941 this seems to leave no good options for asserting errors thrown in async functions if you are using TypeScript.
This is still an issue in the latest version of Vitest.