visionmedia/mocha — Issue #151: Stories, functional testing, Cucumber Scenarios
Author: quangv
Created: 2011-12-17 09:11:22+00:00
State: open

Hey, so I understand how to use Mocha for unit testing with `describe`, `it`, but how do you use it for higher-level acceptance/functional testing? Something in the realm of _Cucumber_.

You think this is a good add-on syntax for Mocha?

[I'm messing around with it now, `Feature = Scenario, Given = When = Then = describe`,](https://github.com/quangv/mocha-cakes)

So you can do things like

```
Feature 'Test',
"In order to test",
"as a developer",
"I use mocha", ->

Scenario 'BDD', ->
Given 'should', ->
When 'true', ->
it ('test'), ->
true.should.be.true
Then 'assertTrue', ->
```