Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Promisify<...> has no call signatures #2866

Open
6 tasks done
MeowningMaster opened this issue Feb 14, 2023 · 3 comments
Open
6 tasks done

Type Promisify<...> has no call signatures #2866

MeowningMaster opened this issue Feb 14, 2023 · 3 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@MeowningMaster
Copy link

Describe the bug

I'm trying to reproduce resolves example. The Chai style assertion throws strange Typescript error:
image

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

@MeowningMaster MeowningMaster changed the title Type 'Promisify<...>' has no call signatures Type Promisify<...> has no call signatures Feb 14, 2023
@FeldrinH
Copy link

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.

@FeldrinH
Copy link

Together with #3941 this seems to leave no good options for asserting errors thrown in async functions if you are using TypeScript.

@hanneswidrig
Copy link

This is still an issue in the latest version of Vitest.

@sheremet-va sheremet-va added the p3-minor-bug An edge case that only affects very specific usage (priority) label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

4 participants