Getting Started
Installation
To get started with Frisby.js, add it to your project as a dev dependency:
Writing and Running Tests
Frisby.js uses Jasmine style assertion syntax, and uses Jest to run tests.
Jest can run sandboxed tests in parallel, which fits the concept of HTTP testing very nicely so your API tests run much faster than other test runners, or using Jasmine directly.
Install Jest
If you don't have Jest installed in your project yet, install it:
Create your tests
By default, Jest looks for a folder named __tests__
. If it does not exist in your project yet, go ahead and create it:
Now open __tests__/api/api_spec.js
and add the following content:
Run your tests from the CLI
To run your tests, open a Terminal or console window, and type jest
from the root folder of your project:
Last updated