Created
February 7, 2021 18:38
-
-
Save dualyticalchemy/21139da78980f4d68ed7a595972e54ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chalk = require('chalk'); | |
module.exports = (chromeOptionsConfig, active) => { | |
const msg = [ | |
`Are you testing for phone or tablet? Check`, | |
chalk.white('/tests/conf/platform.conf.json'), | |
`for the default`].join(' '); | |
const notifications = [ | |
{ | |
"rel": "help", | |
"command": chalk.blue(msg) | |
} | |
]; | |
const help = notification => notification.rel === 'help'; | |
console.log(notifications.filter(help).pop().command); | |
const has = (name) => chromeOptionsConfig | |
&& chromeOptionsConfig[active || 'default'] | |
&& chromeOptionsConfig[active || 'default'] | |
.mobileEmulation | |
.device | |
.includes(name); | |
return { | |
has | |
}; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment