diff --git a/types/tape/index.d.ts b/types/tape/index.d.ts index 85af8d06ad..d7da838859 100644 --- a/types/tape/index.d.ts +++ b/types/tape/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for tape v4.2.2 +// Type definitions for tape v4.2.29 // Project: https://github.com/substack/tape -// Definitions by: Bart van der Schoor , Haoqun Jiang +// Definitions by: Bart van der Schoor +// Haoqun Jiang +// Dennis Schwartz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -44,6 +46,11 @@ declare namespace tape { */ export function skip(name: string, cb: tape.TestCase): void; + /** + * The onFinish hook will get invoked when ALL tape tests have finished right before tape is about to print the test summary. + */ + export function onFinish(cb: () => void): void; + /** * Like test(name, cb) except if you use .only this is the only test case that will run for the entire process, all other test cases using tape will be ignored. */ diff --git a/types/tape/tape-tests.ts b/types/tape/tape-tests.ts index 9884ece458..09847fe9a9 100644 --- a/types/tape/tape-tests.ts +++ b/types/tape/tape-tests.ts @@ -16,6 +16,7 @@ tape(name, (test: tape.Test) => { tape.skip(name, cb); tape.only(name, cb); +tape.onFinish(() => {}); var sopts: tape.StreamOptions;