mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-13 22:00:19 -04:00
feat(curriculum): implement more specific tests for step one of the flexbox workshop (#65296)
This commit is contained in:
@@ -12,12 +12,21 @@ Start this project by linking your `styles.css` file to the page.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your `link` element should have an `href` attribute with the value `styles.css`.
|
||||
You should have a `link` element within your `head` element.
|
||||
|
||||
```js
|
||||
assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/)
|
||||
assert.exists(document.querySelector("head>link"));
|
||||
```
|
||||
|
||||
Your `link` element should have `rel="stylesheet"` and `href="styles.css"`.
|
||||
|
||||
```js
|
||||
const link = document.querySelector("head>link");
|
||||
assert.equal(link?.getAttribute("rel"), "stylesheet");
|
||||
const href = link?.getAttribute("data-href");
|
||||
assert.oneOf(href, ["./styles.css", "styles.css"]);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
Reference in New Issue
Block a user