update CONFIG_FILE_REQUIRE_ERROR

This commit is contained in:
Tim Griesser
2022-02-21 16:23:48 -05:00
parent 0beaaef4d2
commit d3b1969a75
6 changed files with 8 additions and 10 deletions
@@ -34,11 +34,11 @@
</style>
</head>
<body><pre><span style="color:#e05561">Your <span style="color:#e5e510">pluginsFile<span style="color:#e05561"> is invalid: <span style="color:#4ec4ff">/path/to/pluginsFile<span style="color:#e05561"><span style="color:#e6e6e6">
<body><pre><span style="color:#e05561">Your <span style="color:#e5e510">configFile<span style="color:#e05561"> is invalid: <span style="color:#4ec4ff">/path/to/pluginsFile<span style="color:#e05561"><span style="color:#e6e6e6">
<span style="color:#e05561"><span style="color:#e6e6e6">
<span style="color:#e05561">It threw an error when required, check the stack trace below:<span style="color:#e6e6e6">
<span style="color:#c062de"><span style="color:#e6e6e6">
<span style="color:#c062de">Error: fail whale<span style="color:#e6e6e6">
<span style="color:#c062de"> at makeErr (cypress/packages/errors/test/unit/visualSnapshotErrors_spec.ts)<span style="color:#e6e6e6">
<span style="color:#c062de"> at PLUGINS_FILE_ERROR (cypress/packages/errors/test/unit/visualSnapshotErrors_spec.ts)<span style="color:#e6e6e6"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>
<span style="color:#c062de"> at CONFIG_FILE_REQUIRE_ERROR (cypress/packages/errors/test/unit/visualSnapshotErrors_spec.ts)<span style="color:#e6e6e6"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>
</pre></body></html>
@@ -649,7 +649,7 @@ describe('visual error templates', () => {
default: ['/path/to/supportFile'],
}
},
PLUGINS_FILE_ERROR: () => {
CONFIG_FILE_REQUIRE_ERROR: () => {
const err = makeErr()
return {
@@ -148,11 +148,11 @@ function run (ipc, configFile, projectRoot) {
err.originalMessage = err.message
err.message = cleanMessage
ipc.send('loadConfig:error', util.serializeError(err))
} else {
ipc.send('loadConfig:error', util.serializeError(err))
}
ipc.send('loadConfig:error', util.serializeError(
require('@packages/errors').getError('CONFIG_FILE_REQUIRE_ERROR', configFile, err),
))
}
})
}
+1 -2
View File
@@ -419,7 +419,6 @@ Error: Async error from plugins file
`
exports['e2e plugins fails when invalid event is registered 1'] = `
Your pluginsFile threw a validation error: /foo/bar/.projects/plugin-validation-error/cypress/plugins/index.js
@@ -539,7 +538,7 @@ If you have just renamed the extension of your pluginsFile, restart Cypress.
`
exports['e2e plugins fails when require throws synchronously 1'] = `
Your pluginsFile is invalid: /foo/bar/.projects/plugins-root-sync-error/cypress/plugins/index.js
Your configFile is invalid: /foo/bar/.projects/plugins-root-sync-error/cypress.config.js
It threw an error when required, check the stack trace below:
@@ -1 +0,0 @@
{}