mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-16 15:49:20 +08:00
fix: clarify hint and improve test flexibility in book catalog exercise (#62120)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
co-authored by
Ilenia
parent
77f02ff755
commit
e8753a7c0d
+2
-2
@@ -109,11 +109,11 @@ The `td` element in your `tfoot` element's row should have it's `colspan` attrib
|
||||
assert.equal(document.querySelector('tfoot tr td')?.colSpan, 4);
|
||||
```
|
||||
|
||||
The `td` element in your `tfoot` element's row should have the text `Total Books: [number of books in your table]`.
|
||||
The `td` element in your `tfoot` element's row should have the text `Total Books: N` where `N` is the number of books in your table.
|
||||
|
||||
```js
|
||||
const numberOfBooks = document.querySelectorAll('tbody tr')?.length;
|
||||
assert.equal(document.querySelector('tfoot tr td').textContent, `Total Books: ${numberOfBooks}`);
|
||||
assert.equal(document.querySelector('tfoot tr td').textContent.trim(), `Total Books: ${numberOfBooks}`);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user