Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Latest commit

 

History

History
37 lines (27 loc) · 976 Bytes

README.mkd

File metadata and controls

37 lines (27 loc) · 976 Bytes

ooc-bdd

Build Status

ooc-bdd is a BDD-style testing library for the ooc language. It uses a testing syntax similar to the one Jasmine uses. It allows for tests (and output) that almost read like prose:

import bdd

describe("A string 'llama'", ||
    it("should not be 'alpaca'", ||
        expect("llama") not toBe("alpaca")
    )

    it("should match ^[a-m]+$", ||
        expect("llama") toMatch("^[a-m]+$")
    )
)

See (and run!) the test.ooc file for more examples.

Features

  • BDD-style syntax with expect()
  • Assertion-style syntax with require()
  • Invert expectations with not
  • Nicely colored output
  • Tallying of passed and failed tests and timing included
  • Put any code in your tests and specs.
  • Nested specs supported

License

ooc-bdd is distributed under the terms of the ISC license.