Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_setup.js « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3fb226e5ed3cd1caf318a260d1fb291521412d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Setup for unit test environment */
// eslint-disable-next-line no-restricted-syntax
import { setImmediate } from 'timers';
import 'helpers/shared_test_setup';

afterEach(() =>
  // give Promises a bit more time so they fail the right test
  // eslint-disable-next-line no-restricted-syntax
  new Promise(setImmediate).then(() => {
    // wait for pending setTimeout()s
    jest.runOnlyPendingTimers();
  }),
);