From ed68984d256078f7a0a5a75700421b8beb3ffbb2 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 31 May 2022 07:28:12 +0200 Subject: [PATCH] Clean --- lib/createTopLevelExpect.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/createTopLevelExpect.js b/lib/createTopLevelExpect.js index 16dc88299..f4f826916 100644 --- a/lib/createTopLevelExpect.js +++ b/lib/createTopLevelExpect.js @@ -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')) { @@ -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) {