0.5.0 • Published 11 years ago

jessie v0.5.0

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

= Jessie - a Node runner for Jasmine http://stillmaintained.com/futuresimple/jessie.png

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

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 https://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}https://github.com/benrady/jezebel.

=== Usage with grunt

If you use grunt, there's a plugin for it, called {grunt-jessie}https://npmjs.org/package/grunt-jessie by Kenneth Jørgensen.

== 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 https://github.com/mhevery/jasmine-node. The goal of jessie is to be more modular and configurable.

=== Copyright

Copyright (c) 2011 Marcin Bunsch, Future Simple Inc. See LICENSE for details.

0.5.0

11 years ago

0.4.2

12 years ago

0.4.1

12 years ago

0.4.0

12 years ago

0.3.7

13 years ago

0.3.6

13 years ago

0.3.5

13 years ago

0.3.4

13 years ago

0.3.2

13 years ago

0.3.1

13 years ago

0.3.0

13 years ago

0.2.1

13 years ago

0.2.0

13 years ago