Merge pull request #11899 from beckend/jest-it-callback-strictNullChecks-fix

[types-2.0] jest - It optional callback fix
This commit is contained in:
Paul van Brenk
2016-11-30 14:22:35 -08:00
committed by GitHub
3 changed files with 12 additions and 3 deletions

4
jest/index.d.ts vendored
View File

@@ -91,7 +91,7 @@ declare namespace jest {
}
interface ProvidesCallback {
(cb?: DoneCallback): any;
(cb: DoneCallback): any;
}
interface Lifecycle {
@@ -99,7 +99,7 @@ declare namespace jest {
}
interface It {
(name: string, fn: ProvidesCallback): void;
(name: string, fn?: ProvidesCallback): void;
only: It;
skip: It;
concurrent: It;

View File

@@ -358,3 +358,12 @@ describe('genMockFromModule', function () {
});
});
});
/**
* Pass strictNullChecks
*/
describe('strictNullChecks', function () {
it('does not complain when using done callback', (done) => {
done();
})
});

View File

@@ -3,7 +3,7 @@
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"