Skip to content

[types-2.0] jest - It optional callback fix - #11899

Merged
paulvanbrenk merged 1 commit into
DefinitelyTyped:types-2.0from
beckend:jest-it-callback-strictNullChecks-fix
Nov 30, 2016
Merged

paulvanbrenk merged 1 commit into
DefinitelyTyped:types-2.0from
beckend:jest-it-callback-strictNullChecks-fix

Conversation

@beckend

@beckend beckend commented Oct 11, 2016 •

Copy link
Copy Markdown
Contributor

When using strictNullChecks, it detects a minor misstake that declares the actual function as optional, but truth is the parameter is optional, not the other way around.

This example fails:

describe('strictNullChecks', function () {
    it('does not complain when using done callback', (done) => {
        done(); // error is possibly undefined
    })
});

I can revert strictNullChecks if you want to but it's very useful to find bugs like these.

@vvakame vvakame added the @types label Oct 12, 2016
@beckend

beckend commented Nov 7, 2016

Copy link
Copy Markdown
Contributor Author

@vvakame do you have any reviewers for this PR?

@vvakame

vvakame commented Nov 8, 2016

Copy link
Copy Markdown
Member

wow, sorry.

@vvakame

vvakame commented Nov 8, 2016 •

Copy link
Copy Markdown
Member

jest/index.d.ts

to authors (@pspeter3 @vsiao @NoHomey @jwbay). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

@vvakame

vvakame commented Nov 8, 2016 •

Copy link
Copy Markdown
Member

When we can't get response from author. please ping me after 3 days. I'll merge this PR.

@jwbay

jwbay commented Nov 8, 2016

Copy link
Copy Markdown
Contributor

👍 LGTM

@NoHomey

NoHomey commented Nov 8, 2016

Copy link
Copy Markdown
Contributor

LGTM.

@beckend

beckend commented Nov 11, 2016

Copy link
Copy Markdown
Contributor Author

@vvakame ping.

@alexeagle
alexeagle force-pushed the types-2.0 branch 2 times, most recently from eae5d89 to ec9eb4b Compare November 23, 2016 21:00
@paulvanbrenk
paulvanbrenk merged commit 4869902 into DefinitelyTyped:types-2.0 Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants