1
0
Fork 0
mirror of synced 2024-06-28 11:00:55 +12:00
budibase/packages/builder/cypress/support/filterTests.js
Mitch-Budibase 9fe8a8c687 lint changes
2022-01-21 13:12:16 +00:00

17 lines
362 B
JavaScript

const filterTests = (testTags, runTest) => {
// testTags is an array of tags
// runTest is all tests
if (Cypress.env("TEST_TAGS")) {
const tags = Cypress.env("TEST_TAGS").split("/")
const found = testTags.some($testTags => tags.includes($testTags))
if (found) {
runTest()
}
} else {
runTest()
}
}
export default filterTests