I have a simple Node application that takes form data from a website and saves to a Google sheets document. Wrote this some time back and now I am trying to write tests for it.
I have the submit function which is called when the client visits the '/submit' post route. Its content are:
// submit.routes.js
function Submit(req, res, next) {
const { data, token } = req.body;
const url = `https://www.google.com/recaptcha/api/siteverify?secret=${secret_key}&response=${token}`;