Skip to content

Commit af26a7c

Browse files
authored
fix(curriculum): allow whitespaces in tests by trimming textContent for Build a Balance Sheet (freeCodeCamp#61312)
1 parent 4b1f1ac commit af26a7c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

curriculum/challenges/english/25-front-end-development/workshop-balance-sheet/61fd70336ebb3e4f62ee81ba.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ assert.strictEqual(
2525
Your `caption` element should have the text `Assets`.
2626
2727
```js
28-
assert.strictEqual(document.querySelector('caption')?.textContent, 'Assets');
28+
assert.strictEqual(document.querySelector('caption')?.textContent.trim(), 'Assets');
2929
```
3030
3131
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-balance-sheet/61fd7b3fcaa5406257abc5d1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Your `caption` element should have the text `Liabilities`.
2525
```js
2626
assert.strictEqual(
2727
document.querySelectorAll('table')?.[1]?.querySelector('caption')
28-
?.textContent,
28+
?.textContent.trim(),
2929
'Liabilities'
3030
);
3131
```

curriculum/challenges/english/25-front-end-development/workshop-balance-sheet/61fd9a4ff2fc4481b9157bd7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Your `caption` element should have the text `Net Worth`.
2222
2323
```js
2424
const table = document.querySelectorAll('table')?.[2];
25-
assert.strictEqual(table?.querySelector('caption')?.textContent, 'Net Worth');
25+
assert.strictEqual(table?.querySelector('caption')?.textContent.trim(), 'Net Worth');
2626
```
2727
2828
Your third `table` element should have a `thead` element.

0 commit comments

Comments
 (0)