fix(curriculum): improve test fail message for the src attribute in Step 32 (#59040)

Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
Co-authored-by: sembauke <semboot699@gmail.com>
This commit is contained in:
Mohamad Salman
2025-04-02 18:35:03 +02:00
committed by GitHub
parent 71b66b8aa5
commit 3b30aa5ff7
2 changed files with 18 additions and 5 deletions

View File

@@ -35,9 +35,15 @@ The Cats `img` element should be nested in the `figure` element.
```js
const catsImg = document.querySelectorAll('figure > img')[1];
assert(
catsImg &&
catsImg.getAttribute('src').toLowerCase() === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg'
assert.exists(catsImg);
```
The third image should have a `src` attribute set to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg`.
```js
const catsImg = document.querySelectorAll('figure > img')[1];
assert.strictEqual(
catsImg?.src?.toLowerCase(), 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg'
);
```

View File

@@ -35,8 +35,15 @@ The Cats `img` element should be nested in the `figure` element.
```js
const catsImg = document.querySelectorAll('figure > img')[1];
assert.equal(
catsImg?.getAttribute('src')?.toLowerCase(), 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg'
assert.exists(catsImg);
```
The third image should have a `src` attribute set to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg`.
```js
const catsImg = document.querySelectorAll('figure > img')[1];
assert.strictEqual(
catsImg?.src?.toLowerCase(), 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg'
);
```