# Getting Started

## Installation

To get started with Frisby.js, add it to your project as a dev dependency:

```
npm install frisby --save-dev
```

## Writing and Running Tests

Frisby.js uses Jasmine style assertion syntax, and uses [Jest](https://facebook.github.io/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:

```
npm install --save-dev jest
```

### 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:

```
mkdir -p __tests__/api
touch __tests__/api/api_spec.js
```

Now open `__tests__/api/api_spec.js` and add the following content:

```
const frisby = require('frisby');

it('should be a teapot', function () {
  return frisby.get('http://httpbin.org/status/418')
    .expect('status', 418);
});
```

### 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:

```
jest
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frisbyjs.com/introduction/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
