forked from tsai/budibase
4 changed files with 35 additions and 21 deletions
@ -1,16 +1,16 @@ |
|||||
const filterTests = (testTags, runTest) => { |
const filterTests = (testTags, runTest) => { |
||||
// testTags is an array of tags
|
// testTags is an array of tags
|
||||
// runTest is all tests
|
// runTest is all tests
|
||||
if (Cypress.env('TEST_TAGS')) { |
if (Cypress.env("TEST_TAGS")) { |
||||
const tags = Cypress.env('TEST_TAGS').split('/'); |
const tags = Cypress.env("TEST_TAGS").split("/") |
||||
const found = testTags.some(($testTags) => tags.includes($testTags)); |
const found = testTags.some($testTags => tags.includes($testTags)) |
||||
|
|
||||
if (found) { |
if (found) { |
||||
runTest(); |
runTest() |
||||
} |
|
||||
} else { |
|
||||
runTest(); |
|
||||
} |
} |
||||
}; |
} else { |
||||
|
runTest() |
||||
export default filterTests; |
} |
||||
|
} |
||||
|
|
||||
|
export default filterTests |
||||
|
|||||
Loading…
Reference in new issue