mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-11 22:01:07 -04:00
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:
@@ -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'
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user