Skip to content

Commit

Permalink
fix build issues
Browse files Browse the repository at this point in the history
Co-authored-by: Michiel Pauw <[email protected]>
Co-authored-by: NioniosSpeed <[email protected]>
  • Loading branch information
3 people authored and Kristján Oddsson committed May 28, 2024
1 parent 9d81dcf commit 3e137ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/html-has-lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import htmlHasLang from "../src/rules/html-has-lang";
* Create a `<html></html>` in a iframe so that we aren't using the `<html>` element of the test runner.
*/
async function createHTMLElement(htmlString: string): Promise<HTMLElement> {
return (
await fixture(html`<iframe srcdoc="<!DOCTYPE html>${htmlString}"></iframe>`)
).contentDocument // @ts-expect-error Just trust me bro
.querySelector("html")!;
const iframe = (await fixture(
html`<iframe srcdoc="<!DOCTYPE html>${htmlString}"></iframe>`,
)) as HTMLIFrameElement;

return iframe.contentDocument!.querySelector("html")!;
}

describe("html-has-lang", function () {
Expand Down

0 comments on commit 3e137ee

Please sign in to comment.