Question: HOW CAN TEST THIS FUNCTION WITH JEST OR JASMINE? function addToLib() { // A function that creates a new object with title and message then
HOW CAN TEST THIS FUNCTION WITH JEST OR JASMINE?
function addToLib() {
// A function that creates a new object with title and message then adds it to the signature array
var newSignature = {title : document.getElementById("title_input").value,
message : document.getElementById("message_input").value
}
signatureList.push(newSignature);
var updatedDropdown = document.getElementById("signatures");
var option = document.createElement("option");
option.value = newSignature.title;
updatedDropdown.appendChild(option);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
