From 511bbf41aaac9668a50c00a9aa19b85b8c3e77b5 Mon Sep 17 00:00:00 2001 From: Brian Mann Date: Tue, 22 Feb 2022 09:59:37 -0500 Subject: [PATCH] revise PLUGINS_INVALID_EVENT_NAME_ERROR error --- .../__snapshot-html__/PLUGINS_INVALID_EVENT_NAME_ERROR.html | 2 +- packages/errors/src/errors.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/errors/__snapshot-html__/PLUGINS_INVALID_EVENT_NAME_ERROR.html b/packages/errors/__snapshot-html__/PLUGINS_INVALID_EVENT_NAME_ERROR.html index 6d6de4819e..896c3a8855 100644 --- a/packages/errors/__snapshot-html__/PLUGINS_INVALID_EVENT_NAME_ERROR.html +++ b/packages/errors/__snapshot-html__/PLUGINS_INVALID_EVENT_NAME_ERROR.html @@ -34,7 +34,7 @@ -
Your configFile threw a validation error: /path/to/configFile
+    
Your configFile threw a validation error from: /path/to/cypress.config.js
 
 You must pass a valid event name when registering a plugin.
 
diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts
index 4487083dad..1988583f4b 100644
--- a/packages/errors/src/errors.ts
+++ b/packages/errors/src/errors.ts
@@ -647,7 +647,7 @@ export const AllCypressErrors = {
   // TODO: make this relative path, not absolute
   PLUGINS_INVALID_EVENT_NAME_ERROR: (pluginsFilePath: string, invalidEventName: string, validEventNames: string[], err: Error) => {
     return errTemplate`
-      Your ${fmt.highlightSecondary(`configFile`)} threw a validation error: ${fmt.path(pluginsFilePath)}
+      Your ${fmt.highlightSecondary(`configFile`)} threw a validation error from: ${fmt.path(pluginsFilePath)}
 
       You must pass a valid event name when registering a plugin.