Skip to content


Vance Lucas edited this page Jul 27, 2017 · 3 revisions

Upgrading From Frisby 0.x to 2.x

A lot has changed since the last Frisby release!

Announcement Issue:

Primary Changes

  • Frisby v2 no longer calls any Jasmine functions like describe or it, etc. You must now define your own jasmine test, and then use Frisby inside it for issuing HTTP requests and running assertions on the response.
  • Smaller API: expect(<type>, <...args>) and expectNot(<type>, <...args>) are the only expectation methods now. The expectNot method simply inverts the expectation (i.e. it expects an error to be thrown)

Code Example:


Frisby used to create the whole Jasmine test for you:

var frisby = require('frisby');

frisby.create('should get user Joe Schmoe')
  .get(testHost + '/users/1')
    id: 1,
    email: ''


The old way caused lots of issues and limited flexibility, so now Frisby v2 does not:

var frisby = require('frisby');

it('should get user Joe Schmoe', function(doneFn) {
  frisby.get(testHost + '/users/1')
    .expect('status', 200)
    .expect('json', {
      id: 1,
      email: ''
Clone this wiki locally
You can’t perform that action at this time.