Cypress v3.7.0
The plugins file receives resolved config object with properties from cypress.json resolved. But the config object has plugins, fixtures, integration paths - yet it does not have the project root or configuration filename. Since we have added --config-file option, we should pass it in the config object (or false is the user has disabled it)
See https://docs.cypress.io/guides/guides/command-line.html#cypress-run-config-file-lt-config-file-gt
Expected behavior with the following plugins file
module.exports = (on, config) => {
console.log(config.configFile)
}
$ cypress run
cypress.json
$ cypress run --config-file false
false
$ cypress run --config-file my-config.json
/resolved/path/to/my-config.json