type ErrorHandlerValidation = Readonly<{ isValid: true; message: null; }> | Readonly<{ isValid: false; message: string; }>; /** * Validate the provided error handler to confirm that it properly re-throws * errors when `Ember.testing` is true. * * This is intended to be used by test framework hosts (or other libraries) to * ensure that `Ember.onerror` is properly configured. Without a check like * this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_ * like everything is just fine (and have green tests) when in reality * everything is on fire... * * @public * @param {Function} [callback=Ember.onerror] the callback to validate * @returns {Object} object with `isValid` and `message` * * @example