I am looking to conduct unit testing on this Typescript code that has been transpiled using Clasp into Google App Script:
function onLinksInText(text: GoogleAppsScript.Document.Text, onLink: OnLinkCallback) {
const iterator = new TextIterator(text, onLink)
const characters = text.getText();
for (let i = 0; i < characters.length; i++) {
iterator.handle(i, text.getLinkUrl(i));
}
iterator.end()
}
In order to proceed with the unit testing, I must initialize an instance of GoogleAppsScript.Document.Text
Could you please guide me on how to achieve that?