grep-tests-from-pull-requests
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "grep-tests-from-pull-requests", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Grabs the test tags to run from the pull request text", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,2 +5,4 @@ # grep-tests-from-pull-requests | ||
Read the blog post [Pick Tests To Run Using The Pull Request Text](https://glebbahmutov.com/blog/pick-tests-using-pull-request/). | ||
## Install | ||
@@ -43,2 +45,19 @@ | ||
## Resolved value | ||
The function might resolve with an object if the pull request was found. You can check if the user wants to run all the tests, or a list of tags | ||
```js | ||
const testsToRun = await require('grep-tests-from-pull-requests')(...) | ||
if (testsToRun) { | ||
if (testsToRun.all) { | ||
console.log('running all tests') | ||
} else if (testsToRun.tags.length) { | ||
console.log('the user picked %s tags to run', testsToRun.tags.join(', ')) | ||
} else { | ||
console.log('the user did not pick any tests to run') | ||
} | ||
} | ||
``` | ||
## Debugging | ||
@@ -45,0 +64,0 @@ |
@@ -86,2 +86,4 @@ /// <reference types="cypress" /> | ||
} | ||
return testsToRun | ||
} | ||
@@ -88,0 +90,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13212
277
105