Skip to content

Parameterized fixtures? #7188

Answered by sheremet-va
jasonkuhrt asked this question in Q&A
Jan 7, 2025 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

My point is about passing arguments to existing fixtures. In this example:

You can extend already extended tests, it will just override existing fixture:

const test = baseTest.extend({ a: 1 })
const test2 = test.extend({ a: 3 })
test2('', ({ a }) => {
  a // 3
})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jasonkuhrt
Comment options

@sheremet-va
Comment options

Answer selected by jasonkuhrt
@jasonkuhrt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants