How to take in the ejs file instead of small fragments in code in jsdom
18 views
Skip to first unread message
Harsh Pande
unread,
Feb 22, 2022, 2:28:52 AM2/22/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?