mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-13 08:32:54 +08:00
feat(curriculum): add test to check anchor text (#57375)
This commit is contained in:
+6
@@ -17,6 +17,12 @@ You should use the existing anchor element, do not create a new one.
|
||||
assert.lengthOf(document.querySelectorAll('a'), 1);
|
||||
```
|
||||
|
||||
The text inside the anchor element should not change, it must be `cat photos`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(document.querySelector('a').innerText, "cat photos");
|
||||
```
|
||||
|
||||
You should have the words `See more ` before the anchor element. Make sure you include the space after the last word.
|
||||
|
||||
```js
|
||||
|
||||
+6
@@ -17,6 +17,12 @@ You should use the existing anchor element, do not create a new one.
|
||||
assert.lengthOf(document.querySelectorAll('a'), 1);
|
||||
```
|
||||
|
||||
The text inside the anchor element should not change, it must be `cat photos`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(document.querySelector('a').innerText, "cat photos");
|
||||
```
|
||||
|
||||
You should have the words `See more ` before the anchor element.
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user