fix(curriculum): forum leaderboard project step 61 - added test cases for test method solution (#54048)

This commit is contained in:
Tomas
2024-03-12 13:49:43 +02:00
committed by GitHub
parent e324c8ce2b
commit 896a88d08e

View File

@@ -26,7 +26,7 @@ assert(code.match(/const\s+userAvatarUrl\s*=/));
You should assign a `ternary` operator to the `userAvatarUrl`. Your `ternary` should check if `avatar` starts with `/user_avatar/` and return `avatarUrl.concat(avatar)` or `avatar`.
```js
assert(code.match(/const\s+userAvatarUrl\s*=\s*avatar\.startsWith\(\s*('|")\/user_avatar\/\1\s*\)\s*\?\s*avatarUrl\.concat\(\s*avatar\s*\)\s*:\s*avatar\s*/));
assert(code.match(/const\s+userAvatarUrl\s*=\s*(?:avatar\.startsWith\(\s*('|")\/user_avatar\/\1\s*\)|\/\^\\\/user_avatar\\\/\/\.test\(\s*avatar\s*\))\s*\?\s*avatarUrl\.concat\(\s*avatar\s*\)\s*:\s*avatar/));
```
# --seed--