Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Node runner for Jasmine JavaScript BDD testing framework

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 package.json
README.rdoc

Jessie - a Node runner for Jasmine

Jessie is a Node runner for Jasmine. It was created to provide better reporting on failures, more modular design, easier creation of formatters and optional syntactic sugar.

Installation

Stable version is available on npm, so you can install by using:

npm install jessie

If you want to install the edge development version, simply clone this repo and install from it:

git clone git://github.com/futuresimple/jessie.git
npm install ./jessie

Usage

$ jessie
Usage:
  jessie [OPTIONS] [spec dirs/files]

Options:
  -f, --format [STRING]  Output format to use (Default is progress)
  -v, --version          Display the current version
  -h, --help             Display help and usage details

Jessie will run specs in any folder you specify, but it will automatically load up 'spec/spec_helper.js' if it is present.

For details on how to use Jasmine, consult the Jasmine docs at github.com/pivotal/jasmine/wiki

Formatters

Currently Jessie ships with 3 formatters: progress, nested and xunit. By default it uses progress. If you want to use a different one, you can do it by specifying the -f option:

jessie -f [formatter_name] spec
  • Special note on xunit:

Since this formatter is more useful when in a Continuous Integration environment, sending its output to an XML file would be the most common thing to do. Given that Jessie creates separate processes to execute the tests, simply sending the output to a file like “jessie -f xunit spec > test_results.xml” wouldn't work most of the times. So the following does the trick:

jessie -f xunit spec | cat > test_results.xml

Pending specs

Jessie extends Jasmine with the ability of marking pending specs. You have 2 options - one is to call it with only the description, like this:

it("should be pending")

Another way is to call the pending() function within your spec, like this:

it("should be pending", function() {
  pending()
})

Optionally, you can provide a message that will appear within spec results, simply by sending an argument to pending(), like this:

it("should be pending", function() {
  pending("Add real spec here!")
})

Sugar

If you want, Jessie can extend the built-in prototypes with syntactic sugar, so you can use methods like this:

variable.should_be("Foo Boo")
variable.should_not_be(4)
variable.should_match("Boo")
variable.should_be_a(String)

The number of these methods is limited and will possibly grow with time.

To use them, put this line into spec/spec_helper.js

require('jessie').sugar()

CoffeeScript

Jessie supports CoffeeScript out of the box. All you need to do is add this line to spec/spec_helper.js

require('coffee-script')

With that set set up, you can test your CoffeeScript code and have specs in CoffeeScript.

Continuous test runner

If you want to have your specs run continuously, see Jezebel.

Development

Jessie is a fresh project, so forks are very welcome!

Testing

Tests are in Jasmine and run on Jessie. In order to run them, use the binary in the bin folder (be sure to run `npm install` first to get the dependencies)

bin/jessie spec

Acknowledgement

jessie is largely based on github.com/mhevery/jasmine-node. The goal of jessie is to be more modular and configurable.

Copyright

Copyright © 2011 Marcin Bunsch, Future Simple Inc. See LICENSE for details.

Something went wrong with that request. Please try again.