Acceptance tests in the browser (Yadda)

85 views
Skip to first unread message

John Syrinek

unread,
Jan 21, 2014, 8:21:58 PM1/21/14
to compo...@googlegroups.com
I just submitted this pull request to Yadda: Add support for running tests in the browser with component.io. This means you can write feature specs with your stakeholders and then hold each other accountable by testing against them. Great for living documentation, regression testing, and politics. See the example in the repo, for details, but here's an example feature:

Feature: Mocha Asynchronous Example

Scenario: A bottle falls from the wall

    Given 100 green bottles are standing on the wall
    when 1 green bottle accidentally falls
    then there are 99 green bottles standing on the wall

Scenario: No bottles are left

    Given 1 green bottles are standing on the wall
    when 1 green bottle accidentally falls
    then there are 0 green bottles standing on the wall

@Pending
Scenario: Bottles are reset

Given there are no green bottles
when 5 minutes has elapsed
then there are 100 green bottles standing on the wall

Scenario: [N] bottles are standing on a wall

    Given [N] green bottles are standing on the wall
    when 1 green bottle accidentally falls
    then there are [N-1] green bottles standing on the wall

    Where:
        N   | N-1
        100 | 99
        99  | 98
        10  | 9
 
You could that your code implements this behavior with a simple `make test` once everything's setup.
 
Reply all
Reply to author
Forward
0 new messages