Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(testrunners): brush up testrunners doc
Pavel671e465450ee
diff --git a/docs/README.md b/docs/README.mdindex a5521a04f8..fc1526a3c9 100644--- a/docs/README.md+++ b/docs/README.md@@ -53,12 +53,10 @@- [CircleCI](./ci.md#circleci)- [AppVeyor](./ci.md#appveyor)- [Troubleshooting](./troubleshooting.md)-1. Test runners- - Jest- - Mocha- - Karma- - Jasmine- - Storybooks+1. [Test runners](./test-runners.md)+ - [Jest / Jasmine](./test-runners.md#jest--jasmine)+ - [AVA](./test-runners.md#ava)+ - [Mocha](./test-runners.md#mocha)1. [Selector engines](./selectors.md)1. [Extensibility](./extensibility.md)- [Custom selector engines](./extensibility.md#custom-selector-engines)diff --git a/docs/test-runners.md b/docs/test-runners.mdindex a860c3bded..d5db9c8590 100644--- a/docs/test-runners.md+++ b/docs/test-runners.md@@ -1,9 +1,20 @@# Test Runners-## Basic SetupWith a few lines of code, you can hook up Playwright to your favorite JavaScript test runner.-### Jest / Jasmine+<!-- GEN:toc -->+- [Jest / Jasmine](#jest--jasmine)+- [AVA](#ava)+- [Mocha](#mocha)+- [IDE support](#ide-support)+- [Multiple Browsers](#multiple-browsers)+<!-- GEN:stop -->++<br>++<br>++## Jest / JasmineFor Jest, [jest-playwright](https://github.com/playwright-community/jest-playwright) can be used. However for a light-weight solution, requiring playwright directly works fine. Jest shares it's syntax with Jasmine, so this applies to Jasmine as well.@@ -30,7 +41,9 @@ it('should work', async () => {});```-### AVA+<br>++## AVATests run concurrently in AVA, so a single page variable cannot be shared between tests. Instead, create new pages with a macro function.@@ -55,7 +68,9 @@ test('should work', pageMacro, async (t, page) => {});```-### Mocha+<br>++## MochaMocha looks very similar to the Jest/Jasmine setup, and functions in the same way.@@ -81,9 +96,9 @@ it('should work', async () => {assert.equal(await page.title(), 'Example Domain');});```+<br>--## Types+## IDE supportIf using TypeScript, add types to your variables like:```ts