Skip to content

Commit

Permalink
test: add test for extend tag media attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasmerlin committed Aug 27, 2023
1 parent 8f8d2c7 commit 0a9ec78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/seo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ describe("Extended tags", () => {
"Agent"
);
});

it("sets the media attribute when included", () => {
cy.get('head meta[name="theme-color"]').should(
"have.attr",
"media",
"(prefers-color-scheme: dark)"
);
});
});

describe("Extended link tags", () => {
Expand Down
1 change: 1 addition & 0 deletions src/pages/extendedTags.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import SEO from "../SEO.astro";
},
{ name: "twitter:title", content: "Tinker Tailor Soldier Spy" },
{ name: "twitter:description", content: "Agent" },
{ name: "theme-color", media: "(prefers-color-scheme: dark)", content: "theme_color_dark" }
],
}}
/>
Expand Down

0 comments on commit 0a9ec78

Please sign in to comment.