My goal is really simple. I would like to create a class named Helper to store all common data/methods for my collection.
In the main pre-request Script this is the code :
var HELPER = pm.globals.get("HELPER");
console.log(HELPER.mandatory);
console.log(HELPER.checkIfEmpty());
I'm able to retrieve the mandatory variable but I cannot call checkIfEmpty
I get the following message:
TypeError: HELPER.checkIfEmpty is not a function
As you can see, this method exist.
I checked this link but without success ...
Do you have any idea what I missed ??
I found a way to manage what I expected :
and the main pre-request Script code :
console.log(helper.mandatorySubIssues());
console.log(helper.checkIfEmpty("Hello World"));