Sim Greenbaum
06/03/2024, 5:43 PMfunction openSuitle(id, invoice, type = "Bill") {
return url.resolveScript({
scriptId: **********,
deploymentId: "************",
returnExternalUrl: false,
params: {
recid: id,
invoice: invoice,
type: type,
},
});
}
erictgrubaugh
06/03/2024, 5:52 PMresolveScript()
works. It's not our job to unit test the SuiteScript API, and there's no recourse you can take if it fails.
That said, in order to test this function, you'll have to mock the url
module and its resolveScript
function.erictgrubaugh
06/03/2024, 5:52 PMerictgrubaugh
06/03/2024, 5:53 PM