From bc42ad1f2763beb083f235da068ddf9a74f68b8c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 17 Jun 2021 08:35:46 -0400 Subject: [PATCH] fix(curriculum): add regex for comma separated const declarations (#42518) Co-authored-by: Pat Lehmann --- .../redux/use-const-for-action-types.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/03-front-end-libraries/redux/use-const-for-action-types.md b/curriculum/challenges/english/03-front-end-libraries/redux/use-const-for-action-types.md index 5893acce88..e34d2505f4 100644 --- a/curriculum/challenges/english/03-front-end-libraries/redux/use-const-for-action-types.md +++ b/curriculum/challenges/english/03-front-end-libraries/redux/use-const-for-action-types.md @@ -88,8 +88,9 @@ The `authReducer` function should handle multiple action types with a switch sta ```js const noWhiteSpace = __helpers.removeWhiteSpace(code); assert( - /constLOGIN=(['"`])LOGIN\1/.test(noWhiteSpace) && - /constLOGOUT=(['"`])LOGOUT\1/.test(noWhiteSpace) + (/constLOGIN=(['"`])LOGIN\1/.test(noWhiteSpace) && + /constLOGOUT=(['"`])LOGOUT\1/.test(noWhiteSpace)) || + /const(LOGIN|LOGOUT)=(['"`])\1\2,(?!\1)(LOGIN|LOGOUT)=(['"`])\3\4/.test(noWhiteSpace) ); ```