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

docs: global beforeEach/beforeAll hooks #32348

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Aug 27, 2024

Fixes #9468

@yury-s yury-s force-pushed the docs-global-before-each-all branch from 7f2207a to c8b52b3 Compare August 27, 2024 23:32
docs/src/test-fixtures-js.md Outdated Show resolved Hide resolved
docs/src/test-fixtures-js.md Outdated Show resolved Hide resolved
docs/src/test-fixtures-js.md Show resolved Hide resolved
docs/src/test-fixtures-js.md Show resolved Hide resolved
docs/src/test-fixtures-js.md Outdated Show resolved Hide resolved
docs/src/test-fixtures-js.md Outdated Show resolved Hide resolved
@yury-s yury-s merged commit acd2a4d into microsoft:main Aug 28, 2024
3 checks passed
@yury-s yury-s deleted the docs-global-before-each-all branch August 28, 2024 00:04
@diegohaz
Copy link

This works, but TypeScript is completely clueless:

image

Am I right to assume this feature isn't supported yet?

@yury-s
Copy link
Member Author

yury-s commented Aug 28, 2024

It is already supported. Looks like the type inference is busted without explicit template parameter, changing the declaration to

export const test = base.extend<{ forEachTest: void }>({
...

should resolve the problem. I'll update the docs.

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.

[Feature] global beforeEach/beforeAll hooks
3 participants