Skip to content

Commit

Permalink
Merge 1fb34c6 into febc947
Browse files Browse the repository at this point in the history
  • Loading branch information
bnadim committed Nov 22, 2018
2 parents febc947 + 1fb34c6 commit aaaee09
Show file tree
Hide file tree
Showing 38 changed files with 4,316 additions and 2,170 deletions.
12 changes: 12 additions & 0 deletions .commitlintrc.yml
@@ -0,0 +1,12 @@
rules:
type-enum:
- 2
- always
- ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]
subject-empty:
- 2
- never
subject-max-length:
- 2
- always
- 80
3 changes: 3 additions & 0 deletions .huskyrc
@@ -0,0 +1,3 @@
hooks:
pre-commit: lint-staged
commit-msg: commitlint -E HUSKY_GIT_PARAMS
12 changes: 12 additions & 0 deletions .lintstagedrc
@@ -0,0 +1,12 @@
README.tpl.md:
- readme
- git add

"*.feature":
- cucumberjs --require examples/support examples/features --tags @offline

"*.js":
- yarn lint-fix
- yarn fmt
- git add
- jest --bail --findRelatedTests
7 changes: 4 additions & 3 deletions .travis.yml
@@ -1,11 +1,12 @@
language: node_js
node_js:
- '6'
- '7'
- '8'
- '10'
- '11'
env:
- CUMCUMBER_VERSION=2.x.x
- CUMCUMBER_VERSION=3.x.x
- CUMCUMBER_VERSION=4.x
- CUMCUMBER_VERSION=5.x
script:
- yarn add cucumber@${CUMCUMBER_VERSION}
- yarn run lint
Expand Down
28 changes: 14 additions & 14 deletions README.md
Expand Up @@ -49,7 +49,7 @@ It's also the perfect companion for testing CLI applications built with commande
## Requirements

- Node.js `>=6.0.0`
- cucumber `>=2.0.0`
- cucumber `>=4.0.0`

## Installation

Expand All @@ -70,24 +70,24 @@ Then all you have to do is installing the provided extensions:
```javascript
// /support/world.js

const { defineSupportCode } = require('cucumber')
const { setWorldConstructor } = require('cucumber')
const { state, fixtures, httpApi, cli } = require('@ekino/veggies')

defineSupportCode(({ setWorldConstructor }) => {
setWorldConstructor(function() {
state.extendWorld(this)
fixtures.extendWorld(this)
httpApi.extendWorld(this)
cli.extendWorld(this)
})

setWorldConstructor(function() {
state.extendWorld(this)
fixtures.extendWorld(this)
httpApi.extendWorld(this)
cli.extendWorld(this)
})

state.install(defineSupportCode)
fixtures.install(defineSupportCode)

state.install()
fixtures.install()
httpApi.install({
baseUrl: 'http://localhost:3000',
})(defineSupportCode)
cli.install(defineSupportCode)
baseUrl: 'http://localhost:3000'
})
cli.install()
```

## Features
Expand Down

0 comments on commit aaaee09

Please sign in to comment.