diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 0ba1762485..669a96fa23 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -220,7 +220,7 @@ declare namespace jest { } interface Describe { - (name: string, fn: EmptyFunction): void; + (name: string | Function, fn: EmptyFunction): void; only: Describe; skip: Describe; } diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 4d8ae05e1c..146c848a72 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -10,6 +10,10 @@ declare const $: any; // Tests based on the Jest website jest.unmock('../sum'); +class TestClass { } + +describe(TestClass, () => { }); + describe('sum', () => { it('adds 1 + 2 to equal 3', () => { const sum: (a: number, b: number) => number = require('../sum');