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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!