docs(test-runner): add frontmatter to custom TS page (#8398)

This commit is contained in:
Max Schmitt 2021-08-24 15:57:45 +02:00 committed by GitHub
parent d52250f2c5
commit a48dd8b84b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,8 @@
---
id: test-typescript
title: "Advanced: TypeScript"
---
## Manually compile tests with TypeScript ## Manually compile tests with TypeScript
Playwright Test supports TypeScript out the box. We automatically transform Playwright Test supports TypeScript out the box. We automatically transform
@ -7,6 +12,7 @@ However if you find that the TypeScript code is not being transpiled correctly,
you can perform your own TypeScript compilation before sending the tests to Playwright. you can perform your own TypeScript compilation before sending the tests to Playwright.
First I add a `tsconfig.json` file inside my tests directory. First I add a `tsconfig.json` file inside my tests directory.
```json ```json
{ {
"compilerOptions": { "compilerOptions": {
@ -20,6 +26,7 @@ First I add a `tsconfig.json` file inside my tests directory.
``` ```
In my `package.json`, I have two scripts: In my `package.json`, I have two scripts:
```json ```json
{ {
"scripts": { "scripts": {