fix(curriculum): update test to accept array destructuring (#46753)

fix: update test to accept array destructuring
This commit is contained in:
Luke Steinmann
2022-07-05 18:52:24 +03:00
committed by GitHub
parent 1bf45bb1fe
commit 7e8b5816bc
@@ -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)
);
```