From 86a8429895dadef7267744b8a5b9cb878bc29cd7 Mon Sep 17 00:00:00 2001 From: dufresnesteven Date: Tue, 10 Aug 2021 09:40:31 +0900 Subject: [PATCH] Add items to an array to remove duplicates. --- actions/ui-check/tests/reporters/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/ui-check/tests/reporters/index.js b/actions/ui-check/tests/reporters/index.js index 2d4f092..631d8b4 100644 --- a/actions/ui-check/tests/reporters/index.js +++ b/actions/ui-check/tests/reporters/index.js @@ -15,7 +15,7 @@ const WARNING_DOCS_URL = const getTemplate = ( key, obj ) => `Test Name: ${ obj.title } Details: -${ obj.details.join( '\n' ) } +${ Object.keys( obj.details ).join( '\n' ) } Help: ${ getDocInformation( obj.severity, key ) } @@ -65,7 +65,7 @@ class MyCustomReporter { this.errors[ id ] = {}; this.errors[ id ].title = result.title; this.errors[ id ].pages = []; - this.errors[ id ].details = []; + this.errors[ id ].details = {}; this.errors[ id ].severity = ''; } @@ -89,7 +89,7 @@ class MyCustomReporter { ); this.errors[ id ].severity = typeMatches[ 1 ]; - this.errors[ id ].details.push( matches[ 1 ].trim() ); + this.errors[ id ].details[ matches[ 1 ].trim() ] = true; } } }