title: Promise.allSettled is not a function in jest test, how to mock?
body: <p>I have an action that uses Promise.allSettled to return multiple stat objects from an API.
  When I run the tests with mocking I get the error 
  <code>Promise.allSettled is not a function</code></p>
  
  <p>I have a get endpoint to returns different types of stats.
  <code>myapi.com/get_stats/:type</code></p>
  
  <p>I have an action for this API as follows</p>
  
  <pre><code>  const types = ['seo', 'referrers', 'clicks', 'posts', 'videos'];
    const promises = [];
    types.forEach(type =&gt;
      promises.push(
        api().stats.getStats(type),
      ),
    );
    Promise.allSettled(promises).then(res =&gt; {
      const { statData, statErrors } = mapData(res); // Data manipulation
      dispatch({ type: FETCH_STATS_RESOLVED, payload: { statData, statErrors } });
    });
  </code></pre>
  
  <p>My Test set up</p>
  
  <pre><code>jest.mock('api-file.js', () =&gt; ({
    api: () =&gt; ({
       stats: {
           getStats: type =&gt; {
             switch (type) {
                case: 'seo':
                  return mockSeoStats;
             }
           }
        } 
    })
  }));
  </code></pre>
  
  <p>in beforeEach()</p>
  
  <pre><code>mockSeoStats.mockImplementation(() =&gt; Promise.resolve({ value: {data: myData} }));
  </code></pre>
  
  <p>I can see that the Action is receiving these mocked values, but Promise.allSettled is complaining</p>
  
  <p>I assume it's having a hard time with the jest mock structure</p>
  
  <p>So, how can i mock Promise.allSettled to just return what I expect it to, instead of looking at my mocked functions?</p>