@@ -1350,14 +1350,14 @@ expectPrototype.addAdditionalPromiseMethods = function (promise, subject) {
1350
1350
) ;
1351
1351
} else {
1352
1352
if ( wrappedExpect !== expect ) {
1353
- return wrappedExpect . shifty (
1353
+ return wrappedExpect . _shifty (
1354
1354
shiftedSubject ,
1355
1355
wrappedExpect . args ,
1356
1356
[
1357
1357
methodName . replace ( / [ A - Z ] / g, ( $0 ) => ` ${ $0 . toLowerCase ( ) } ` ) ,
1358
1358
...args ,
1359
1359
] ,
1360
- true // legacy mode (FIXME)
1360
+ true // setArgsOutput
1361
1361
) ;
1362
1362
} else {
1363
1363
return expect . _executeExpect (
@@ -1917,10 +1917,9 @@ expectPrototype._callInNestedContext = function (callback) {
1917
1917
}
1918
1918
} ;
1919
1919
1920
- expectPrototype . shifty = function ( subject , args , rest , legacyMode ) {
1920
+ expectPrototype . _shifty = function ( subject , args , rest , setArgsOutput ) {
1921
1921
const nextArgumentType = this . findTypeOf ( rest [ 0 ] ) ;
1922
- if ( legacyMode ) {
1923
- // Legacy
1922
+ if ( setArgsOutput ) {
1924
1923
this . argsOutput = ( output ) => {
1925
1924
args . forEach ( ( arg , index ) => {
1926
1925
if ( index > 0 ) {
@@ -1985,7 +1984,8 @@ expectPrototype.shift = function (subject, assertionIndex) {
1985
1984
if ( assertionIndex !== - 1 ) {
1986
1985
const args = this . args . slice ( 0 , assertionIndex ) ;
1987
1986
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 ) ;
1989
1989
} else {
1990
1990
// No assertion to delegate to. Provide the new subject as the fulfillment value:
1991
1991
return subject ;
0 commit comments