Merge pull request #19929 from jamieklassen/no-global-agent-in-tests

mock global-agent/bootstrap in tests
This commit is contained in:
Jamie Klassen
2023-09-14 11:28:59 -04:00
committed by GitHub
@@ -31,6 +31,9 @@ import { rest } from 'msw';
import { NotFoundError } from '@backstage/errors';
import { Lockfile } from '../../lib/versioning/Lockfile';
// Avoid mutating the global http(s) agent used in other tests
jest.mock('global-agent/bootstrap', () => {});
// Remove log coloring to simplify log matching
jest.mock('chalk', () => ({
red: (str: string) => str,