mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): adjust test text to match instructions (#54086)
This commit is contained in:
+2
-1
@@ -38,13 +38,14 @@ Submit your page when you think you've got it right. If you're running into erro
|
||||
|
||||
# --hints--
|
||||
|
||||
Event `'user'` should be emitted with `name`, `currentUsers`, and `connected`.
|
||||
Event `'user'` should be emitted with `username`, `currentUsers`, and `connected`.
|
||||
|
||||
```js
|
||||
async (getUserInput) => {
|
||||
const url = new URL("/_api/server.js", getUserInput("url"));
|
||||
const res = await fetch(url);
|
||||
const data = await res.text();
|
||||
// Regex is lenient to match both `username` and `name` as the key on purpose.
|
||||
assert.match(
|
||||
data,
|
||||
/io.emit.*('|")user\1.*name.*currentUsers.*connected/s,
|
||||
|
||||
Reference in New Issue
Block a user