Skip to content

Commit

Permalink
feat(dx): run tests related to modified files on precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Jul 9, 2017
1 parent b1139a9 commit 41303e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"check-fmt": "prettier --print-width 100 --tab-width=4 --single-quote --bracket-spacing --no-semi --list-different \"{src,tests,scripts}/**/*.js\"",
"version": "echo ${npm_package_version}",
"lint": "eslint .",
"lint-fix": "eslint --fix .",
"readme": "node scripts/generate_readme",
"doc": "jsdoc src -R README.md -r -d _doc --verbose -t node_modules/minami",
"doc-pub": "yarn run readme && yarn run doc && gh-pages -d _doc",
Expand All @@ -73,6 +74,11 @@
"lint-staged": {
"README.tpl.md": ["readme", "git add"],
"*.feature": ["examples"],
"*.js": ["fmt", "lint", "git add"]
"*.js": [
"lint-fix",
"fmt",
"git add",
"jest --bail --findRelatedTests"
]
}
}
3 changes: 3 additions & 0 deletions src/extensions/http_api/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ module.exports = ({ baseUrl = '' } = {}) => ({ Given, When, Then }) => {
})
})

/**
* Checking response header.
*/
Then(/^response header (.+) should (not )?(equal|contain|match) (.+)$/, function(
key,
flag,
Expand Down

0 comments on commit 41303e3

Please sign in to comment.