mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-16 07:29:52 +08:00
fix(curriculum): update test to accept array destructuring (#46753)
fix: update test to accept array destructuring
This commit is contained in:
+2
-1
@@ -90,7 +90,8 @@ const noWhiteSpace = __helpers.removeWhiteSpace(code);
|
||||
assert(
|
||||
(/constLOGIN=(['"`])LOGIN\1/.test(noWhiteSpace) &&
|
||||
/constLOGOUT=(['"`])LOGOUT\1/.test(noWhiteSpace)) ||
|
||||
/const(LOGIN|LOGOUT)=(['"`])\1\2,(?!\1)(LOGIN|LOGOUT)=(['"`])\3\4/.test(noWhiteSpace)
|
||||
/const(LOGIN|LOGOUT)=(['"`])\1\2,(?!\1)(LOGIN|LOGOUT)=(['"`])\3\4/.test(noWhiteSpace) ||
|
||||
/const\[(LOGIN|LOGOUT),(?!\1)(LOGIN|LOGOUT)\]=\[(['"`])\1\3,\3\2\3\]/.test(noWhiteSpace)
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user