Skip to content

Commit

Permalink
Remove duplicated function name that confuses the TS compiler.
Browse files Browse the repository at this point in the history
With this small change we have much more sane inferred types
when Unexpected is required() within, for example, VSCode.
  • Loading branch information
alexjeffburke committed Dec 17, 2019
1 parent 4bfcb44 commit 9b6ac24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/createTopLevelExpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ expectPrototype._executeExpect = function(
return oathbreaker(assertionRule.handler(wrappedExpect, subject, ...args));
};

expectPrototype._expect = function expect(context, args, forwardedFlags) {
expectPrototype._expect = function(context, args, forwardedFlags) {
const subject = args[0];
const testDescriptionString = args[1];

Expand Down

0 comments on commit 9b6ac24

Please sign in to comment.