docs(test-runner): add a note re: fixture naming (#15203)

This commit is contained in:
Ross Wollman 2022-06-28 14:55:06 -07:00 committed by GitHub
parent 69273e42ae
commit 51fd212906
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,6 +219,10 @@ export const test = base.extend<MyFixtures>({
export { expect } from '@playwright/test';
```
:::note
Custom fixture names should start with a letter or underscore, and can contain only letters, numbers, underscores.
:::
## Using a fixture
Just mention fixture in your test function argument, and test runner will take care of it. Fixtures are also available in hooks and other fixtures. If you use TypeScript, fixtures will have the right type.