@@ -1350,14 +1350,14 @@ expectPrototype.addAdditionalPromiseMethods = function (promise, subject) {
13501350 ) ;
13511351 } else {
13521352 if ( wrappedExpect !== expect ) {
1353- return wrappedExpect . shifty (
1353+ return wrappedExpect . _shifty (
13541354 shiftedSubject ,
13551355 wrappedExpect . args ,
13561356 [
13571357 methodName . replace ( / [ A - Z ] / g, ( $0 ) => ` ${ $0 . toLowerCase ( ) } ` ) ,
13581358 ...args ,
13591359 ] ,
1360- true // legacy mode (FIXME)
1360+ true // setArgsOutput
13611361 ) ;
13621362 } else {
13631363 return expect . _executeExpect (
@@ -1917,10 +1917,9 @@ expectPrototype._callInNestedContext = function (callback) {
19171917 }
19181918} ;
19191919
1920- expectPrototype . shifty = function ( subject , args , rest , legacyMode ) {
1920+ expectPrototype . _shifty = function ( subject , args , rest , setArgsOutput ) {
19211921 const nextArgumentType = this . findTypeOf ( rest [ 0 ] ) ;
1922- if ( legacyMode ) {
1923- // Legacy
1922+ if ( setArgsOutput ) {
19241923 this . argsOutput = ( output ) => {
19251924 args . forEach ( ( arg , index ) => {
19261925 if ( index > 0 ) {
@@ -1985,7 +1984,8 @@ expectPrototype.shift = function (subject, assertionIndex) {
19851984 if ( assertionIndex !== - 1 ) {
19861985 const args = this . args . slice ( 0 , assertionIndex ) ;
19871986 const rest = this . args . slice ( assertionIndex ) ;
1988- return this . shifty ( subject , args , rest , arguments . length > 1 ) ;
1987+ const setArgsOutput = arguments . length > 1 ;
1988+ return this . _shifty ( subject , args , rest , setArgsOutput ) ;
19891989 } else {
19901990 // No assertion to delegate to. Provide the new subject as the fulfillment value:
19911991 return subject ;
0 commit comments