mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): update assert for real time counter lab (#59854)
This commit is contained in:
parent
260ef108dc
commit
9c8631ad15
@ -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"`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user