{"repo":"vlucas/frisby","free":true,"listed":false,"github":"https://github.com/vlucas/frisby","clone":"git clone https://github.com/vlucas/frisby.git","description":"Frisby is a REST API testing framework built on Jest that makes testing API endpoints easy, fast, and fun.","language":"JavaScript","stars":1512,"topics":["testing","testing-framework","rest-api","jasmine","jest","integration-testing","hacktoberfest"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"Frisby Introduction Frisby.js an API testing tool built on top of Jest that makes testing API endpoints easy, fast and fun. Installation Install Frisby v2.x from NPM into your project: npm install --save-dev frisby joi Creating Tests Simple Example The minimum setup to run a single test expectation. Nested Dependent HTTP Calls A more complex example with nested dependent Frisby tests with Frisby's Promise-style then method. Built-In Expect Handlers Frisby comes with many handy built-in expect handlers to help you test the HTTP response of your API. status - Check HTTP status header - Check HTTP header key + value json - Match JSON structure + values (RegExp can be used) jsonStrict - Match EXACT JSON structure + values (extra keys not tested for cause test failures) jsonTypes - Match JSON structure + value types jsonTypesStrict - Match EXACT JSON structure + value types (extra keys not tested for cause test failures) bodyContains - Match partial body content (string or regex) responseTime - Check if request completes within a specified duration (ms) Define Custom Expect Handlers When Frisby's built-in expect handlers are not enough, or if you find yourself running the same expectations in multiple places in your tests, you can define your own custom expect handler once, and then run it from anywhere in your tests. Expecting JSON types using Joi With Frisby, you can use Joi to set the expectation that the JSON body response from the HTTP call meets a defined schema. Check out t","default_branch":null,"files":null,"tree":[],"storefront":"/r/vlucas","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vlucas/frisby/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."}