mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): update assert for real time counter lab (#59854)
This commit is contained in:
+3
-2
@@ -33,7 +33,7 @@ const textInput = document.querySelector('textarea');
|
||||
assert.equal(textInput.id, 'text-input');
|
||||
```
|
||||
|
||||
You should have a `p` element with the `id` of `char-count`.
|
||||
You should have a `p` element with the `id` of `char-count`.
|
||||
|
||||
```js
|
||||
const charCount = document.querySelector('p');
|
||||
@@ -43,7 +43,8 @@ assert.equal(charCount.id, 'char-count');
|
||||
The `#char-count` `p` element should initially contain the text `Character Count: 0/50`.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('p')?.innerText, 'Character Count: 0/50');
|
||||
const charCount = document.querySelector('p')?.innerText;
|
||||
assert.equal(charCount, 'Character Count: 0/50');
|
||||
```
|
||||
|
||||
When the `#text-input` element contains the text `hello coder` the `#char-count` element should contain the text `"Character Count: 11/50"`
|
||||
|
||||
Reference in New Issue
Block a user