1.6.0 • Published 10 years ago

spectacular v1.6.0

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

Spectacular

Build Status Coverage Status Dependency Status

Spectacular is a BDD framework for CoffeeScript and JavaScript whose attempt to bring the power of RSpec to JavaScript. Spectacular try to favor the best practices used for writing better RSpec tests in its design.

This is the kind of tests you can write with Spectacular:

describe Array, ->
  given 'item', -> foo: 'bar'

  it -> should exist

  itsInstance 'length', -> should equal 0

  describe '::indexOf', ->
    context 'with an item not present in the array', ->
      itsReturn with: (-> [@item]), -> should equal -1

    context 'with an item present in the array', ->
      subject 'array', -> [@item]

      specify 'the returned value', ->
        expect(@array.indexOf @item).to equal 0

Features, the short tour

  • Conditionned Specs
  • Matcher based description
  • Implicit subjects
  • Describe auto-subject
  • Factories
  • JSON and HTML fixtures (and more)
  • Promised-based tests run
  • Synchronous and asynchronous matchers
  • Synchronous and asynchronous tests
  • Browser support
  • Shared examples
  • Custom matchers
  • CSS-queries expressions to test the DOM content
  • Strings and objects diff in comparison results
  • The API is provided with both camelCase and snake_case version
  • No external dependencies in browsers

For more information view the documentation

Install

Spectacular is available as a npm module, you can then install it with:

npm install -g spectacular

This will install Spectacular globally and allow you to use the Spectacular command line tool.

Command-line

The most simple way to use the spectacular command line tool is as follow:

spectacular specs/**/*.spec.js

Options

Contributing

I decided to start using the AngularJS commit messages convention for this project. Please use the same convention as well for commits in PR.

1.6.0

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.0

11 years ago

1.3.1

11 years ago

1.3.0

11 years ago

1.2.1

11 years ago

1.2.0

11 years ago

1.1.0

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago