GithubHelp home page GithubHelp logo

Build Status Coverage Status Code Climate styled with prettier

GitHub license npm version Quality

JsGiven aims to bring BDD (Behavior-Driven Development) to plain (or typed) JavaScript.

It is a developer-friendly and pragmatic BDD tool for JavaScript.

Developers write scenarios in plain JavaScript using a fluent, domain-specific API, JsGiven generates reports that are readable by domain experts.

It's a JavaScript port of JGiven (written in Java). JsGiven keeps the JGiven philosophy, concepts and uses its html5 reporting tool.

You can have a look at JSGiven's own report

scenarios('recipes', RecipesStage, ({ given, when, then }) => ({
  a_pancake_can_be_fried_out_of_an_egg_milk_and_flour: scenario({}, () => {
    given()
      .an_egg()
      .and()
      .some_milk()
      .and()
      .the_ingredient('flour');

    when()
      .the_cook_mangles_everything_to_a_dough()
      .and()
      .the_cook_fries_the_dough_in_a_pan();

    then().the_resulting_meal_is_a_pan_cake();
  }),
}));

It can be used with any javascript test runner (like Jest, Ava, Mocha, Jasmine, or Protractor).

It can be used with your favorite assertion library (like ChaiJS, Jasmine), or your framework's assertion library.

It aims to provide the most comfortable developer experience with ES6 class syntax, and optional FlowType or TypeScript typings.

Some features are missing, but the folks at https://www.fluo.com are already using it daily.

Don't hesitate to give any feedback and to open a GitHub issue https://github.com/jsGiven/jsGiven/issues

Getting started

You can start using JsGiven with the user guide https://jsgiven.org/user-guide.html Don't hesitate to give any feedback and to open a GitHub issue https://github.com/jsGiven/jsGiven/issues

JsGiven's Projects

jsgiven icon jsgiven

A developer-friendly and pragmatic BDD tool for JavaScript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.