Skip to content

Commit 0ed0deb

Browse files
fix(curriculum): update blog card's image tests (freeCodeCamp#59522)
1 parent 1c08b1d commit 0ed0deb

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

curriculum/challenges/english/25-front-end-development/lab-blog-post-card/66eaddd04a9e533fba689001.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,22 @@ const readMorePadding = getComputedStyle(readMore).padding;
233233
assert.notStrictEqual(readMorePadding, '0px');
234234
```
235235
236-
Your `.post-img` element should fill the card's `width` and have a `border-bottom` value.
236+
Your `.post-img` element should fill the card's `width`.
237237
238238
```js
239239
const postImg = document.querySelector('.post-img');
240240
assert.exists(postImg);
241241

242242
const imgWidth = getComputedStyle(postImg).width;
243243
const cardWidth = getComputedStyle(postImg.parentElement).width;
244-
assert.strictEqual(imgWidth, cardWidth);
244+
assert.closeTo(Number(imgWidth.replace(/px/ig, "")), Number(cardWidth.replace(/px/ig, "")), 15);
245+
```
246+
247+
Your `.post-img` element should have a `border-bottom` value.
248+
249+
```js
250+
const postImg = document.querySelector('.post-img');
251+
assert.exists(postImg);
245252

246253
const imgBorderBottom = getComputedStyle(postImg).borderBottomWidth;
247254
assert.notStrictEqual(imgBorderBottom, '0px');

0 commit comments

Comments
 (0)