Text.js 625 B

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