Text.js 518 B

123456789101112131415
  1. loadPage("file:///res/html/misc/blank.html");
  2. afterInitialPageLoad(() => {
  3. test("Basic functionality", () => {
  4. const title = document.getElementsByTagName("title")[0];
  5. expect(title).toBeDefined();
  6. // FIXME: Add this in once Text's constructor is implemented.
  7. //expect(title.firstChild).toBeInstanceOf(Text);
  8. expect(title.firstChild.nodeName).toBe("#text");
  9. expect(title.firstChild.data).toBe("Blank");
  10. expect(title.firstChild.length).toBe(5);
  11. });
  12. });