Sign in
Log inSign up
Luca Del Puppo

2 comments

Albert Oliva Roura
Albert Oliva Roura
Mar 8, 2023

Good post!

Does Playwright have a way to validate the json schema we receive in a response?

Thanks!

·
·1 reply
Luca Del Puppo
Luca Del Puppo
Author
·Mar 8, 2023

Hi Albert Oliva Roura, Thanks.

To validate the JSON or you can use the expect directly, like in my example; you can find more on the jest documentation

Or you can build your own validation using other libraries like zod, typebox or fluent-json-schema.

The official way is by the expect, but I understand is not so simple.

1
·