mocha-given
mocha-given copied to clipboard
Promise support
Mocha now has promise support. Would it be possible to also add it to mocha-given? In mocha i can write:
describe 'myPromiseFunction', ->
beforeEach -> someAsyncSetup()
it 'shoud return "foo" async', ->
myPromiseFunction().then (result) ->
result.should.equal 'foo'
It would be awesome if mocha-given supported this:
describe 'myPromiseFunction', ->
Given -> someAsyncSetup()
When -> myPromiseFunction().then (@result) =>
Then -> @result == 'foo'