Files
cypress/packages/extension/lib/util.js
2021-08-04 10:23:45 -04:00

11 lines
313 B
JavaScript

module.exports = {
getCookieUrl: (cookie = {}) => {
const prefix = cookie.secure ? 'https://' : 'http://'
// https://github.com/cypress-io/cypress/issues/6375
const host = cookie.domain.startsWith('.') ? cookie.domain.slice(1) : cookie.domain
return prefix + host + (cookie.path || '')
},
}