-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
Version
27.0.6 and 28.0.0-alpha.4
Steps to reproduce
Expected behavior
No type errors on describe(myFunction, () => {})
Actual behavior
Argument of type '() => void' is not assignable to parameter of type 'string'.
Additional context
Allowing taking in class/function names in describe was added in #5154 and typed in @types/jest in DefinitelyTyped/DefinitelyTyped#23102.
Tests still pass while taking in a name; it's just the typings that are incorrect.
Environment
System:
OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Binaries:
Node: 16.13.0 - /usr/bin/node
Yarn: 3.2.0 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/bin/npm
npmPackages:
jest: workspace:* => 28.0.0-alpha.4