update examples
This commit is contained in:
parent
ec915b9e32
commit
2cf07ba7b9
|
|
@ -8,12 +8,6 @@ This test runner is used internally by Playwright to test Playwright itself.
|
||||||
- modular
|
- modular
|
||||||
- well-isolated state per execution thread
|
- well-isolated state per execution thread
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install --save-dev @playwright/testrunner
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
Save the following as `test.js` and run using `node`:
|
Save the following as `test.js` and run using `node`:
|
||||||
|
|
@ -23,7 +17,7 @@ node test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const {TestRunner, Reporter, Matchers} = require('@playwright/testrunner');
|
const {TestRunner, Reporter, Matchers} = require('.');
|
||||||
|
|
||||||
// Runner holds and runs all the tests
|
// Runner holds and runs all the tests
|
||||||
const runner = new TestRunner({
|
const runner = new TestRunner({
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ This test server is used internally by Playwright to test Playwright itself.
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const {TestServer} = require('@playwright/testrunner');
|
const {TestServer} = require('.');
|
||||||
|
|
||||||
(async(() => {
|
(async(() => {
|
||||||
const httpServer = await TestServer.create(__dirname, 8000),
|
const httpServer = await TestServer.create(__dirname, 8000),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue