UNPKG

mocha-cakes

Version:

bdd stories add-on for mocha test framework with cucumber given/then/when syntax.

50 lines (48 loc) 1.39 kB
<section class="suite"> <h1>Feature: New Feature In order to use cool feature as a new user I want do include this </h1> <dl> <section class="suite"> <h1> Scenario: Singing</h1> <dl> <dt>Given: I am a good singing</dt> <dd><pre><code> it('should be true', function() { return true.should.eql(true); }); return it('should be true too', function() { return true.should.eql(true); });</code></pre></dd> <dt> When: I sing</dt> <dd><pre><code> return voice = 'good';</code></pre></dd> <dt> Then: it should sound good</dt> <dd><pre><code> return voice.should.eql('good');</code></pre></dd> <section class="suite"> <h1>=== /test/describe.spec ===</h1> <dl> </dl> </section> <dt>Given: Test</dt> <dd><pre><code> return true.should.eql(true);</code></pre></dd> <section class="suite"> <h1> When: </h1> <dl> <dt>should be true</dt> <dd><pre><code> return true.should.eql(true);</code></pre></dd> </dl> </section> <dt> Then: Yup</dt> <dd><pre><code> return true.should.eql(true);</code></pre></dd> </dl> </section> </dl> </section>