1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00
budibase/packages/builder/cypress/support/filterTests.js

17 lines
362 B
JavaScript
Raw Normal View History

const filterTests = (testTags, runTest) => {
2022-01-22 02:12:16 +13:00
// 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()
}
2022-01-22 02:12:16 +13:00
} else {
runTest()
}
}
export default filterTests