Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#67580 [jest] Change arguments of todo fu…
Browse files Browse the repository at this point in the history
…nction not to set an invalid callback by @tnyo43

* update tests
make `todo`s take only a name as an argument

* update the type
  • Loading branch information
tnyo43 authored Dec 6, 2023
1 parent 92e9a81 commit 716dd3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion types/jest/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ declare namespace jest {
/**
* Sketch out which tests to write in the future.
*/
todo: It;
todo: (name: string) => void;
/**
* Experimental and should be avoided.
*/
Expand Down
30 changes: 5 additions & 25 deletions types/jest/jest-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ it.skip("name", () => {}, 9001);
it.skip("name", async () => {}, 9001);
it.skip("name", (callback: jest.DoneCallback) => {}, 9001);

it.todo("name", () => {});
it.todo("name", async () => {});
it.todo("name", () => {}, 9001);
it.todo("name", async () => {}, 9001);
it.todo("name", (callback: jest.DoneCallback) => {}, 9001);
it.todo("name");

it.concurrent("name", () => {});
it.concurrent("name", async () => {});
Expand Down Expand Up @@ -186,11 +182,7 @@ fit.skip("name", () => {}, 9001);
fit.skip("name", async () => {}, 9001);
fit.skip("name", (callback: jest.DoneCallback) => {}, 9001);

fit.todo("name", () => {});
fit.todo("name", async () => {});
fit.todo("name", () => {}, 9001);
fit.todo("name", async () => {}, 9001);
fit.todo("name", (callback: jest.DoneCallback) => {}, 9001);
fit.todo("name");

fit.concurrent("name", () => {});
fit.concurrent("name", async () => {});
Expand Down Expand Up @@ -224,11 +216,7 @@ xit.skip("name", () => {}, 9001);
xit.skip("name", async () => {}, 9001);
xit.skip("name", (callback: jest.DoneCallback) => {}, 9001);

xit.todo("name", () => {});
xit.todo("name", async () => {});
xit.todo("name", () => {}, 9001);
xit.todo("name", async () => {}, 9001);
xit.todo("name", (callback: jest.DoneCallback) => {}, 9001);
xit.todo("name");

xit.concurrent("name", () => {});
xit.concurrent("name", async () => {});
Expand Down Expand Up @@ -262,11 +250,7 @@ test.skip("name", () => {}, 9001);
test.skip("name", async () => {}, 9001);
test.skip("name", (callback: jest.DoneCallback) => {}, 9001);

test.todo("name", () => {});
test.todo("name", async () => {});
test.todo("name", () => {}, 9001);
test.todo("name", async () => {}, 9001);
test.todo("name", (callback: jest.DoneCallback) => {}, 9001);
test.todo("name");

test.concurrent("name", () => {});
test.concurrent("name", async () => {});
Expand Down Expand Up @@ -300,11 +284,7 @@ xtest.skip("name", () => {}, 9001);
xtest.skip("name", async () => {}, 9001);
xtest.skip("name", (callback: jest.DoneCallback) => {}, 9001);

xtest.todo("name", () => {});
xtest.todo("name", async () => {});
xtest.todo("name", () => {}, 9001);
xtest.todo("name", async () => {}, 9001);
xtest.todo("name", (callback: jest.DoneCallback) => {}, 9001);
xtest.todo("name");

xtest.concurrent("name", () => {});
xtest.concurrent("name", async () => {});
Expand Down

0 comments on commit 716dd3b

Please sign in to comment.