How to take in the ejs file instead of small fragments in code in jsdom

17 views
Skip to first unread message

Harsh Pande

unread,
Feb 22, 2022, 2:28:52 AM2/22/22
to jsdom
const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`); console.log(dom.window.document.querySelector("p").textContent); // "Hello world"


(`<!DOCTYPE html><p>Hello world</p>`); instead of this thing here I want have my whole file named "list.ejs" which contains my html content. How to render that file?
Reply all
Reply to author
Forward
0 new messages