{"repo":"elaichenkov/odottaa","free":true,"listed":false,"github":"https://github.com/elaichenkov/odottaa","clone":"git clone https://github.com/elaichenkov/odottaa.git","description":"🦥 Custom playwright matchers to test the state of the API response","language":"TypeScript","stars":45,"topics":["typescript","playwright","e2e","testing","assertions","expect","api"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"odottaa Custom playwright matchers to test the state of the API response --- Table of Contents - Table of Contents - Installation - Usage - TypeScript - JavaScript - API - toHaveStatusCode - toHaveStatusText - toBeCreated - toBeUnauthorized - toBeForbidden - toBeNotFound - toHaveJSON - toContainJSON - toMatchJSON - toHaveHeader - toHaveHeaders - toHaveContentType - toContainTextContent - toHaveLocation - toBeRedirected - Author - License Installation This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies : Usage TypeScript 1. Import odottaa module 2. Extend expect with custom API matchers JavaScript API toHaveStatusCode Use toHaveStatusCode matcher to verify that the response's status code is equal to the expected status code toHaveStatusText Use toHaveStatusText matcher to verify that the response' status text is equal to the expected status text toBeCreated Use toBeCreated matcher to verify that the response's status code is 201 toBeUnauthorized Use toBeUnauthorized matcher to verify that the response's status code is 401 toBeForbidden Use toBeForbidden matcher to verify that the response's status code is 403 toBeNotFound Use toBeNotFound matcher to verify that the response's status code is 404 toHaveJSON Use toHaveJSON matcher to verify that the response's body json is equal to the all properties of object instances (also known as \"deep\" equality) toContainJSON Use toContainJSON matcher to verify that ","default_branch":null,"files":null,"tree":[],"storefront":"/r/elaichenkov","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elaichenkov/odottaa/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}