Inspec is a Javascript BDD Test Library that aims to be flexible and powerful yet clean and easy to extend. The source is currently working, but is still considered to be in experimental stage.
describe("Inspec", function(){
it("should work", function(){
expect(true).toBeTrue();
})
it("should fail", function(){
expect(true).not().toBeTrue();
})
it("should be pending")
describe("with a nested example group", function(){
it("should work as a nested example group", function(){
expect(false).toBe(false);
})
})
// W00t?? It's nesting a shared example group
itShouldBehaveLike("a shared example group");
})
sharedExamplesFor("a shared example group", function(){
it("should work as shared example", function(){
expect(true).toBeTrue();
})
// Yes! Shared nested Example Groups!
describe("with nested example groups in shared", function(){
it("should work as a nested example group in shared", function(){
expect(true).toBeTrue();
})
})
})
- Basic Matchers
- Nested Example Groups
- Shared Example Groups ( A.K.A. it_should_behave_like in RSpec )
- Sandbox Example Scope
- Basic HTML Reporter
- Better syntax and organization of matchers for easier extensions.
- Work on Rhino and WScript environment.
- Make sure compatibility with all major browsers
- Allow selective execution of Example groups / Examples
- Make a better HTML Reporter, that hooks into selective executions
- Better Documentations
- Better Error messages on Failure and Exception
- Add Parsers to parse loaded specs before eval (support for better syntax, aka jSpec)
I’m not too sure if I should do that. Making the specs look cleaner, but turning JavaScript tests into some kind of Frankenstein Script…