@revoloo/cypress6
Version:
Cypress.io end to end testing tool
20 lines (15 loc) • 330 B
JavaScript
export default {
hasSpecFile () {
return !!location.hash
},
updateSpecPath (specName) {
location.hash = `/tests/component/${specName}`
},
specPath () {
if (location.hash) {
const match = location.hash.match(/tests\/component\/(.*)$/)
return match && match[1] || ''
}
return ''
},
}