mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): make tests work again (#63504)
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create an `img` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('img'), "'img' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('img'), "'img' element not found");
|
||||
```
|
||||
|
||||
Your `img` element should have the class `"user-img"`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create a `p` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('p'), "'p' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('p'), "'p' element not found");
|
||||
```
|
||||
|
||||
Your `p` element should have the class `"bio"`
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create an anchor element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('a'), "'a' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('a'), "'a' element not found");
|
||||
```
|
||||
|
||||
Your anchor element should have the class `"author-link"`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create a `div` element before your `p` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('p')?.previousElementSibling?.tagName === 'DIV', "'div' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('p')?.previousElementSibling?.tagName === 'DIV', "'div' element not found");
|
||||
```
|
||||
|
||||
Your `div` element should have the `class` set to `"purple-divider"`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create an `img` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('img'), "'img' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('img'), "'img' element not found");
|
||||
```
|
||||
|
||||
Your `img` element should have the class `"user-img"`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create a `p` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('p'), "'p' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('p'), "'p' element not found");
|
||||
```
|
||||
|
||||
Your `p` element should have the class `"bio"`
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create an anchor element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('a'), "'a' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('a'), "'a' element not found");
|
||||
```
|
||||
|
||||
Your anchor element should have the class `"author-link"`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ window.fetch = () => Promise.resolve({json: () => Promise.resolve([{ author: 'Wh
|
||||
You should create a `div` element before your `p` element.
|
||||
|
||||
```js
|
||||
__helpers.retryingTest(() => document.querySelector('p')?.previousElementSibling?.tagName === 'DIV', "'div' element not found");
|
||||
await __helpers.retryingTest(() => document.querySelector('p')?.previousElementSibling?.tagName === 'DIV', "'div' element not found");
|
||||
```
|
||||
|
||||
Your `div` element should have the `class` set to `"purple-divider"`.
|
||||
|
||||
Reference in New Issue
Block a user