Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input test name when calling function #21

Open
ChocolateLoverRaj opened this issue Apr 8, 2022 · 2 comments
Open

Input test name when calling function #21

ChocolateLoverRaj opened this issue Apr 8, 2022 · 2 comments

Comments

@ChocolateLoverRaj
Copy link

This would be useful for snapshot testing, so you don't need to explicitly re-type the snapshot name.

This is what code would look like:

test('add user', async function({ testName }) {
  await assertSnapshot(testName, 'this should be same as last time')
})
@tipiirai
Copy link
Contributor

tipiirai commented Apr 8, 2022

So in above the testName would equal to 'add user'?

@ChocolateLoverRaj
Copy link
Author

So in above the testName would equal to 'add user'?

Yes

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

No branches or pull requests

2 participants