in glean/src/core/pings/ping_type.ts [117:134]
async testBeforeNextSubmit(callbackFn: ValidatorFunction): Promise<void> {
if (testOnlyCheck("testBeforeNextSubmit", LOG_TAG)) {
if (this.testCallback) {
log(
LOG_TAG,
`There is an existing test call for ping "${this.name}". Ignoring.`,
LoggingLevel.Error
);
return;
}
return new Promise((resolve, reject) => {
this.resolveTestPromiseFunction = resolve;
this.rejectTestPromiseFunction = reject;
this.testCallback = callbackFn;
});
}
}