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:
Amrita kumari mishra
2025-09-10 17:42:25 +02:00
committed by GitHub
co-authored by Ilenia
parent 77f02ff755
commit e8753a7c0d
@@ -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--