mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): allow whitespaces in tests by trimming textContent for Build a Balance Sheet (#61312)
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ assert.strictEqual(
|
||||
Your `caption` element should have the text `Assets`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(document.querySelector('caption')?.textContent, 'Assets');
|
||||
assert.strictEqual(document.querySelector('caption')?.textContent.trim(), 'Assets');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ Your `caption` element should have the text `Liabilities`.
|
||||
```js
|
||||
assert.strictEqual(
|
||||
document.querySelectorAll('table')?.[1]?.querySelector('caption')
|
||||
?.textContent,
|
||||
?.textContent.trim(),
|
||||
'Liabilities'
|
||||
);
|
||||
```
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ Your `caption` element should have the text `Net Worth`.
|
||||
|
||||
```js
|
||||
const table = document.querySelectorAll('table')?.[2];
|
||||
assert.strictEqual(table?.querySelector('caption')?.textContent, 'Net Worth');
|
||||
assert.strictEqual(table?.querySelector('caption')?.textContent.trim(), 'Net Worth');
|
||||
```
|
||||
|
||||
Your third `table` element should have a `thead` element.
|
||||
|
||||
Reference in New Issue
Block a user