grep-tests-from-pull-requests
Advanced tools
Comparing version 1.4.0 to 1.5.0
{ | ||
"name": "grep-tests-from-pull-requests", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Grabs the test tags to run from the pull request text", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -46,2 +46,13 @@ # grep-tests-from-pull-requests | ||
**Tip:** you can find the test tags, but skip using them using an option | ||
```js | ||
const pickTestsFromPullRequest = require('grep-tests-from-pull-requests') | ||
const pullOptions = { | ||
..., | ||
setTests: true // default, use false to disable setting the test tags | ||
} | ||
await pickTestsFromPullRequest(on, config, pullOptions) | ||
``` | ||
## baseUrl | ||
@@ -67,2 +78,3 @@ | ||
} | ||
await pickTestsFromPullRequest(on, config, pullOptions) | ||
``` | ||
@@ -69,0 +81,0 @@ |
@@ -78,11 +78,15 @@ /// <reference types="cypress" /> | ||
if (testsToRun.all) { | ||
console.log('running all tests, removing possible grep options') | ||
delete config.env.grep | ||
delete config.env.grepTags | ||
} else if (testsToRun.tags.length) { | ||
const grepTags = testsToRun.tags.join(',') | ||
console.log('grepping by tags "%s"', grepTags) | ||
delete config.env.grep | ||
config.env.grepTags = grepTags | ||
if (options.setTests === false) { | ||
debug('skipping setting the tests to run because setTests is false') | ||
} else { | ||
if (testsToRun.all) { | ||
console.log('running all tests, removing possible grep options') | ||
delete config.env.grep | ||
delete config.env.grepTags | ||
} else if (testsToRun.tags.length) { | ||
const grepTags = testsToRun.tags.join(',') | ||
console.log('grepping by tags "%s"', grepTags) | ||
delete config.env.grep | ||
config.env.grepTags = grepTags | ||
} | ||
} | ||
@@ -89,0 +93,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
14776
288
145