if (resetIgnoredErrorOrWarningMessages) {
      global._ignoredErrorOrWarningMessages = prev;
    }
Runs `fn` while preventing console error and warnings that partially match any given `errorOrWarningMessages` from appearing in the console.
@param errorOrWarningMessages Messages are matched partially (i.e. indexOf), pre-formatting.
@param fn