ladybird/Userland/Libraries/LibWeb/Tests/HTML/document.head.js
Ali Mohammad Pur d897abf4c2 LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
2021-05-18 18:48:15 +01:00

19 lines
718 B
JavaScript

describe("head", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
expect(page.document.head).not.toBeNull();
// FIXME: Add this in once HTMLHeadElement's constructor is implemented.
//expect(page.document.head).toBeInstanceOf(HTMLHeadElement);
expect(page.document.head.nodeName).toBe("HEAD");
});
// FIXME: Add this in once removeChild is implemented.
test.skip("Nullable", () => {
page.document.documentElement.removeChild(page.document.head);
expect(page.document.head).toBeNull();
});
});
waitForPageToLoad();
});