@revoloo/cypress6
Version:
Cypress.io end to end testing tool
26 lines (21 loc) • 478 B
JavaScript
const $Location = require('../cypress/location')
const $utils = require('../cypress/utils')
const create = (state) => {
return {
getRemoteLocation (key, win) {
try {
const remoteUrl = $utils.locToString(win ?? state('window'))
const location = $Location.create(remoteUrl)
if (key) {
return location[key]
}
return location
} catch (e) {
return ''
}
},
}
}
module.exports = {
create,
}