mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Allowed functions in jest's describe
As of 22.0.5, jest allows classes for describe blocks.
This commit is contained in:
Vendored
+1
-1
@@ -220,7 +220,7 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface Describe {
|
||||
(name: string, fn: EmptyFunction): void;
|
||||
(name: string | Function, fn: EmptyFunction): void;
|
||||
only: Describe;
|
||||
skip: Describe;
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user