fix(curriculum): trim innerText in test assertions (#61651)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Rajat Baranwal
2025-08-19 22:26:38 +05:30
committed by GitHub
parent 09654cda4c
commit b62d1d16b5
4 changed files with 4 additions and 4 deletions
@@ -67,7 +67,7 @@ assert.match(code, /<head>.*\s*<title>.*<\/title>.*\s*<\/head>/si);
Your `title` element should have the text `Mr. Whiskers' Blog`. You may need to check your spelling.
```js
const titleText = document.querySelector('title')?.innerText
const titleText = document.querySelector('title')?.innerText.trim();
assert.strictEqual(titleText, "Mr. Whiskers' Blog");
```
@@ -28,7 +28,7 @@ assert.match(code, /<\/h1>/i);
Your `h1` element should have the text of `Welcome to Mr. Whiskers' Blog Page!`. Double check for any spelling errors.
```js
const h1Text = document.querySelector("h1")?.innerText
const h1Text = document.querySelector("h1")?.innerText.trim();
assert.strictEqual(h1Text, "Welcome to Mr. Whiskers' Blog Page!");
```
@@ -69,7 +69,7 @@ assert.match(code, /<head>.*\s*<title>.*<\/title>.*\s*<\/head>/si);
Your `title` element should have the text `Calculus Final Exams Table`. You may need to check your spelling.
```js
const titleText = document.querySelector('title')?.innerText
const titleText = document.querySelector('title')?.innerText.trim();
assert.strictEqual(titleText, "Calculus Final Exams Table");
```
@@ -64,7 +64,7 @@ assert.match(code, /<head>.*\s*<title>.*<\/title>.*\s*<\/head>/si);
Your `title` element should have the text `Hotel Feedback Form`. You may need to check your spelling.
```js
const titleText = document.querySelector('title')?.innerText
const titleText = document.querySelector('title')?.innerText.trim();
assert.strictEqual(titleText, "Hotel Feedback Form");
```