{"_id":"mocha-gherkin","_rev":"34-9a295dccf326525cb5f8ced994789e1a","name":"mocha-gherkin","description":"mocha-gherkin is a Gherkin-style interface and reporter add-on for mocha.","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.15":{"name":"mocha-gherkin","version":"0.1.15","description":"mocha-gherkin is a Gherkin-style interface and reporter add-on for mocha.","keywords":["mocha","gherkin","bdd","cucumber","test","feature","scenario","user story"],"author":{"name":"James G. Kim","email":"jgkim@jayg.org","url":"http://jayg.org/"},"bugs":{"url":"https://github.com/jgkim/mocha-gherkin/issues"},"repository":{"type":"git","url":"git+https://github.com/jgkim/mocha-gherkin.git"},"license":"MIT","main":"build/index.js","scripts":{"prepublish":"npm run build","build":"gulp build","lint":"eslint .","pretest":"ln -sfn .. ./node_modules/mocha-gherkin","test":"mocha --opts tests/mocha.opts tests/addition.feature.js","precover":"ln -sfn .. ./node_modules/mocha-gherkin","cover":"istanbul cover `npm bin`/_mocha -- --opts tests/mocha.opts tests/addition.feature.js","postcover":"remap-istanbul -i ./tests/coverage/coverage-final.json -o ./tests/coverage/lcov-remapped.info -t lcovonly","precoveralls":"npm run cover","coveralls":"cat ./tests/coverage/lcov-remapped.info | `npm bin`/coveralls","postcoveralls":"rm -rf ./tests/coverage","clean":"rm -rf ./build","distclean":"rm -rf ./build ./tests/coverage ./node_modules"},"dependencies":{"colors":"latest","source-map-support":"^0.4.0"},"peerDependencies":{"mocha":"^2.3.4"},"devDependencies":{"babel-core":"^6.2.1","babel-plugin-add-module-exports":"^0.1.1","babel-preset-es2015":"^6.1.18","chai":"latest","coveralls":"^2.11.4","eslint":"^1.10.1","eslint-config-tipplr":"latest","gulp":"^3.9.0","gulp-babel":"^6.1.1","gulp-header":"^1.7.1","gulp-sourcemaps":"^1.6.0","istanbul":"^0.4.1","mocha":"latest","remap-istanbul":"^0.4.0"},"gitHead":"e0c28cd6c6a72a9ce15a2b62c039be4d6a5e6550","homepage":"https://github.com/jgkim/mocha-gherkin#readme","_id":"mocha-gherkin@0.1.15","_shasum":"12c7a150c1b7f1403cb7e3613cf1d4bd2d42171c","_from":".","_npmVersion":"2.14.9","_nodeVersion":"0.12.8","_npmUser":{"name":"jgkim","email":"jgkim@jayg.org"},"dist":{"shasum":"12c7a150c1b7f1403cb7e3613cf1d4bd2d42171c","tarball":"https://registry.npmjs.org/mocha-gherkin/-/mocha-gherkin-0.1.15.tgz","integrity":"sha512-7GigTaTMFh5GaqaqFD7EKUHwZW9f8lRfY6Bpy02hvkZzrpEpLtXhumDksf0Q/HiqZdGpkuR6d2FzEcuL554gNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYmFQj6uwtj95M8afykHfPHUxOAP7jL4wjGDi+u+y/YAIhAMdOc71OzFlCV+wQCef+OX4gfPFHIHLGJ/D4EtLBbusW"}]},"maintainers":[{"name":"jgkim","email":"jgkim@jayg.org"}]},"0.2.0":{"name":"mocha-gherkin","version":"0.2.0","description":"mocha-gherkin is a Gherkin-style interface and reporter add-on for mocha.","keywords":["mocha","gherkin","bdd","cucumber","test","feature","scenario","user story"],"author":{"name":"James G. Kim","email":"jgkim@jayg.org","url":"http://jayg.org/"},"bugs":{"url":"https://github.com/jgkim/mocha-gherkin/issues"},"repository":{"type":"git","url":"git+https://github.com/jgkim/mocha-gherkin.git"},"license":"MIT","main":"build/index.js","scripts":{"prepublish":"npm run build","build":"gulp build","lint":"eslint .","pretest":"ln -sfn .. ./node_modules/mocha-gherkin","test":"mocha --opts tests/mocha.opts tests/addition.feature.js","precover":"ln -sfn .. ./node_modules/mocha-gherkin","cover":"istanbul cover `npm bin`/_mocha -- --opts tests/mocha.opts tests/addition.feature.js","postcover":"remap-istanbul -i ./tests/coverage/coverage-final.json -o ./tests/coverage/lcov-remapped.info -t lcovonly","precoveralls":"npm run cover","coveralls":"cat ./tests/coverage/lcov-remapped.info | `npm bin`/coveralls","postcoveralls":"rm -rf ./tests/coverage","clean":"rm -rf ./build","distclean":"rm -rf ./build ./tests/coverage ./node_modules"},"dependencies":{"colors":"latest","lodash.set":"^4.3.2","source-map-support":"^0.4.6"},"peerDependencies":{"mocha":"latest"},"devDependencies":{"babel-core":"^6.18.2","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.18.0","chai":"latest","coveralls":"^2.11.14","eslint":"^3.9.1","eslint-config-tipplr":"latest","eslint-plugin-ava":"^4.0.0","eslint-plugin-import":"^2.2.0","gulp":"github:gulpjs/gulp#4.0","gulp-babel":"^6.1.2","gulp-header":"^1.8.8","gulp-sourcemaps":"github:floridoo/gulp-sourcemaps","istanbul":"^0.4.5","mocha":"latest","remap-istanbul":"^0.7.0"},"gitHead":"9542725a3c5b557b153bc51ce6d61d1b11dfd3a5","homepage":"https://github.com/jgkim/mocha-gherkin#readme","_id":"mocha-gherkin@0.2.0","_shasum":"1e9b318b11e8266e795736edf433f888bff32f16","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.0.0","_npmUser":{"name":"jgkim","email":"jgkim@jayg.org"},"dist":{"shasum":"1e9b318b11e8266e795736edf433f888bff32f16","tarball":"https://registry.npmjs.org/mocha-gherkin/-/mocha-gherkin-0.2.0.tgz","integrity":"sha512-f1LmEUi6dYhgOQXrk6PF5nwK0II6+/qjuFMYwoI6uUabWsMegNzgJW0nOEoIR8/+OciB95ChnuFwn68jDOs8pQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRYhHZcbwVjyBF5rL9ZB3Oyvz0I02vH9205tkZ4TRkAwIgTMrthdsEmvNixfITzZ86bAL6Z36Ew31vYv2tZbdiKoQ="}]},"maintainers":[{"name":"jgkim","email":"jgkim@jayg.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mocha-gherkin-0.2.0.tgz_1478845449679_0.4436059673316777"}}},"readme":"# mocha-gherkin\n\n[![NPM Version](https://badge.fury.io/js/mocha-gherkin.svg)](https://npmjs.org/package/mocha-gherkin)\n[![Build Status](https://travis-ci.org/jgkim/mocha-gherkin.svg?branch=master)](https://travis-ci.org/jgkim/mocha-gherkin)\n[![Coverage Status](https://coveralls.io/repos/jgkim/mocha-gherkin/badge.svg?branch=master&service=github)](https://coveralls.io/github/jgkim/mocha-gherkin?branch=master)\n[![Dependency Status](https://david-dm.org/jgkim/mocha-gherkin.svg)](https://david-dm.org/jgkim/mocha-gherkin)\n\n`mocha-gherkin` is a [Gherkin](https://github.com/cucumber/cucumber/wiki/Gherkin)-style interface and reporter add-on for [mocha](https://mochajs.org/). This add-on allows you to describe your features using `Feature`, `Scenario`, `Given`, `When`, `Then`, `And`, and `But`. You can use this interface together with mocha's [BDD](https://mochajs.org/#bdd) interface.\n\n### Usage in ECMAScript 6\n\n```javascript\nFeature('Addition',\n  'In order to avoid silly mistakes,',\n  'As a math idiot',\n  'I want to be told the sum of two numbers', () => {\n    Scenario('Add two numbers', () => {\n      let number1;\n      let number2;\n      let sum;\n\n      Given('I have entered 50 into the calculator', () => {\n        number1 = 50;\n      });\n      And('I have entered 70 into the calculator', () => {\n        number2 = 70;\n      });\n      When('I press add', () => {\n        sum = number1 + number2;\n      });\n      Then('the result should be 120 on the screen', () => {\n        expect(sum).to.equal(120);\n      });\n    });\n  });\n```\n\n### Usage in ECMAScript 5\n\n```javascript\nFeature('Addition',\n  'In order to avoid silly mistakes,',\n  'As a math idiot',\n  'I want to be told the sum of two numbers', function () {\n    Scenario('Add two numbers', function () {\n      var number1;\n      var number2;\n      var sum;\n\n      Given('I have entered 50 into the calculator', function () {\n        number1 = 50;\n      });\n      And('I have entered 70 into the calculator', function () {\n        number2 = 70;\n      });\n      When('I press add', function () {\n        sum = number1 + number2;\n      });\n      Then('the result should be 120 on the screen', function () {\n        expect(sum).to.equal(120);\n      });\n    });\n  });\n```\n\n\n## Installing\n\nYou should first have mocha installed:\n```shell\n$ npm install mocha\n```\n\nThen install `mocha-gherkin`, either globally or inside your project:\n```shell\n$ npm install mocha-gherkin\n```\n\n\n## How to Use\n\nActually, `mocha-gherkin` consists of two different add-ons: interface add-on and reporter add-on. To use `mocha-gherkin`, you should first write your features using terms provided by the interface add-on. Then, run `mocha` with the options below:\n```shell\n$ mocha tests/addition.feature.js --ui mocha-gherkin --reporter mocha-gherkin/build/spec\n```\n\n![Screenshot of mocha-gherkin](https://cloud.githubusercontent.com/assets/86622/11293191/fde8783a-8f9a-11e5-8fac-88b91434a6fd.png)\n\n\n## What's Going on?\n\n`Feature` and `Scenario` wrap around mocha's `describe`, and `Given`, `When`, `Then`, `And`, and `But` do the same thing for mocha's `it`. `describe`, `context`, `it`, and other mocha's BDD lingos still work as usal, so you can mix in them with the Gherkin-style terms.\n\n\n## Reporter Support\n\n`mocha-gherkin` has currently only one reporter add-on, which extends mocha's `spec` with support for the Gherkin-style interface. However, you can use other modules as usual since `mocha-gherkin` just wraps around mocha's BDD interface.\n","maintainers":[{"name":"jgkim","email":"jgkim@jayg.org"}],"time":{"modified":"2022-06-20T01:25:28.219Z","created":"2015-11-20T06:28:00.965Z","0.0.1":"2015-11-20T06:28:00.965Z","0.0.2":"2015-11-20T07:36:02.281Z","0.1.1":"2015-11-27T10:15:04.497Z","0.1.2":"2015-11-27T10:18:14.554Z","0.1.3":"2015-11-27T10:20:53.837Z","0.1.4":"2015-11-27T10:22:49.694Z","0.1.5":"2015-11-27T10:29:30.778Z","0.1.6":"2015-11-27T10:34:09.000Z","0.1.7":"2015-11-27T10:46:39.162Z","0.1.8":"2015-11-27T20:01:19.067Z","0.1.9":"2015-11-28T02:49:48.655Z","0.1.10":"2015-11-28T04:17:45.506Z","0.1.11":"2015-11-28T04:22:12.247Z","0.1.13":"2015-11-30T11:55:57.308Z","0.1.14":"2015-12-01T10:58:31.605Z","0.1.15":"2015-12-02T15:26:59.783Z","0.2.0":"2016-11-11T06:24:09.903Z"},"homepage":"https://github.com/jgkim/mocha-gherkin#readme","keywords":["mocha","gherkin","bdd","cucumber","test","feature","scenario","user story"],"repository":{"type":"git","url":"git+https://github.com/jgkim/mocha-gherkin.git"},"author":{"name":"James G. Kim","email":"jgkim@jayg.org","url":"http://jayg.org/"},"bugs":{"url":"https://github.com/jgkim/mocha-gherkin/issues"},"license":"MIT","readmeFilename":"README.md"}