Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed May 31, 2022
1 parent 4ef1622 commit ed68984
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/createTopLevelExpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,14 +1320,9 @@ expectPrototype.setErrorMessage = function (err) {
err.serializeMessage(this.outputFormat());
};

expectPrototype.addAdditionalPromiseMethods = function (
promise,
subject,
) {
const stack = new Error('hey').stack;
expectPrototype.addAdditionalPromiseMethods = function (promise, subject) {
const wrappedExpect = this;
const expect = this._topLevelExpect;
// const expect = this;
promise.and = function (...args) {
function executeAnd() {
if (expect.findTypeOf(args[0]).is('expect.it')) {
Expand Down Expand Up @@ -1581,10 +1576,7 @@ expectPrototype._executeExpect = function (
} else {
result = makePromise.resolve(result);
}
return wrappedExpect.addAdditionalPromiseMethods(
result,
subject,
);
return wrappedExpect.addAdditionalPromiseMethods(result, subject);
};

expectPrototype._camelCaser = function (context, subjectType, subject) {
Expand Down

0 comments on commit ed68984

Please sign in to comment.