-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Version
29.6.2
Steps to reproduce
- Write a custom reporter in JavaScript that only implements
onRunComplete
, as documented here: https://jestjs.io/docs/configuration/#custom-reporters. - Check reporter works fine with Jest.
- Migrate JS to TypeScript and
implement Reporter
(see https://codesandbox.io/s/sharp-babbage-6v54kc?file=/src/index.ts for example)
Expected behavior
No TypeScript errors
Actual behavior
TypeScript error:
Class 'CustomReporter' incorrectly implements interface 'Reporter'.
Type 'CustomReporter' is missing the following properties from type 'Reporter': onRunStart, getLastErrorts(2420)
Additional context
No response
Environment
System:
OS: macOS 13.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 18.17.0 - ~/Library/Caches/fnm_multishells/11306_1692352089946/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/11306_1692352089946/bin/yarn
npm: 9.8.1 - ~/Library/Caches/fnm_multishells/11306_1692352089946/bin/npm
npmPackages:
jest: ^29.2.1 => 29.6.2