Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsGiven/jsGiven
A developer-friendly and pragmatic BDD tool for JavaScript.
https://github.com/jsGiven/jsGiven
ava bdd cucumber gherkin given given-when-then jasmine jest jgiven living-documentation mocha protractor testing then when
Last synced: 4 months ago
JSON representation
A developer-friendly and pragmatic BDD tool for JavaScript.
- Host: GitHub
- URL: https://github.com/jsGiven/jsGiven
- Owner: jsGiven
- License: mit
- Created: 2016-04-30T09:41:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-21T17:15:39.000Z (5 months ago)
- Last Synced: 2024-08-21T22:56:00.027Z (4 months ago)
- Topics: ava, bdd, cucumber, gherkin, given, given-when-then, jasmine, jest, jgiven, living-documentation, mocha, protractor, testing, then, when
- Language: JavaScript
- Homepage: https://jsgiven.org
- Size: 5.83 MB
- Stars: 35
- Watchers: 2
- Forks: 4
- Open Issues: 56
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [JsGiven](https://jsgiven.org)
[![Build Status](https://travis-ci.org/jsGiven/jsGiven.svg?branch=master)](https://travis-ci.org/jsGiven/jsGiven)
[![Coverage Status](https://coveralls.io/repos/github/jsGiven/jsGiven/badge.svg?branch=master)](https://coveralls.io/github/jsGiven/jsGiven?branch=master)
[![Code Climate](https://codeclimate.com/github/jsGiven/jsGiven/badges/gpa.svg)](https://codeclimate.com/github/jsGiven/jsGiven)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/jsGiven/jsGiven/master/LICENSE)
[![npm version](https://badge.fury.io/js/js-given.svg)](https://badge.fury.io/js/js-given)
![Quality](https://img.shields.io/badge/quality-beta-orange.svg)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](http://jgiven.org) (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](https://jsgiven.org/jsgiven-report/)
```javascript
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