-
Notifications
You must be signed in to change notification settings - Fork 77
document globalSetup and globalTeardown #628
Conversation
Pull Request Test Coverage Report for Build 657414691
💛 - Coveralls |
}, | ||
) | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to put after this: https://github.com/playwright-community/jest-playwright#usage-with-custom-runner
README.md
Outdated
) | ||
``` | ||
|
||
## Create your own `globalSetup` and `globalTeardown` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Usage with custom [`globalSetup`](https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string) and [`globalTeardown`](https://facebook.github.io/jest/docs/en/configuration.html#globalteardown-string)
README.md
Outdated
It is possible to create your own [`globalSetup`](https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string) and [`globalTeardown`](https://facebook.github.io/jest/docs/en/configuration.html#globalteardown-string). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove it, because we have this info in header
README.md
Outdated
### Getting authentication state once for all test cases [as per playwright reference](https://playwright.dev/docs/auth?_highlight=globals#reuse-authentication-state): | ||
```js | ||
// global-setup.js | ||
import { globalSetup as superGlobalSetup } from 'jest-playwright-preset'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superGlobalSetup
-> playwrightGlobalSetup
README.md
Outdated
|
||
```js | ||
// global-teardown.js | ||
import { globalTeardown as superGlobalTeardown } from 'jest-playwright-preset'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superGlobalTeardown
-> playwrightGlobalTeardown
@Xezed thanks a lot! |
It will close this one: #611