Skip to content

test: keep a last function argument on the same line after object arguments - #824

Merged
dsherret merged 1 commit into
mainfrom
test-callback-hug-after-object-args
Oct 26, 2026
Merged

dsherret merged 1 commit into
mainfrom
test-callback-hug-after-object-args

Conversation

@dsherret

Copy link
Copy Markdown
Member

Adds a spec for a call whose last argument is a function after two or more object or array arguments. The function stays on the same line as the call:

cy.intercept({ method: "GET" }, { fixture: "x" }, (req) => {
    req.reply();
    doOther();
});

This is what prettier does too, and nothing tested it. It also covers an array arguments case (test.each([1, 2], [3, 4], (a, b) => { ... })) and a function expression.

@dsherret
dsherret merged commit f889aa4 into main Oct 26, 2026
1 check passed
@dsherret
dsherret deleted the test-callback-hug-after-object-args branch October 26, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant