diff --git a/packages/cli-common/src/proxyBootstrap.test.ts b/packages/cli-common/src/proxyBootstrap.test.ts index 5b6bf295df..cefa1bd36e 100644 --- a/packages/cli-common/src/proxyBootstrap.test.ts +++ b/packages/cli-common/src/proxyBootstrap.test.ts @@ -15,10 +15,10 @@ */ import { bootstrapEnvProxyAgents } from './proxyBootstrap'; +// Avoid mutating the global agents used in other tests jest.mock('global-agent', () => ({ bootstrap: jest.fn(), })); - jest.mock('undici', () => ({ setGlobalDispatcher: jest.fn(), EnvHttpProxyAgent: jest.fn(), diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 65d8801859..fc69b0dcff 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -51,8 +51,7 @@ "handlebars": "^4.7.3", "inquirer": "^8.2.0", "ora": "^5.3.0", - "recursive-readdir": "^2.2.2", - "undici": "^7.2.3" + "recursive-readdir": "^2.2.2" }, "devDependencies": { "@backstage/backend-test-utils": "workspace:^", diff --git a/packages/create-app/src/lib/tasks.test.ts b/packages/create-app/src/lib/tasks.test.ts index 0556cbf1da..86a7008b4d 100644 --- a/packages/create-app/src/lib/tasks.test.ts +++ b/packages/create-app/src/lib/tasks.test.ts @@ -36,15 +36,6 @@ import { import { http, HttpResponse, delay } from 'msw'; import { setupServer } from 'msw/node'; -// Avoid mutating the global agents used in other tests -jest.mock('global-agent', () => ({ - bootstrap: jest.fn(), -})); -jest.mock('undici', () => ({ - setGlobalDispatcher: jest.fn(), - EnvHttpProxyAgent: class {}, -})); - jest.spyOn(Task, 'log').mockReturnValue(undefined); jest.spyOn(Task, 'error').mockReturnValue(undefined); jest.spyOn(Task, 'section').mockReturnValue(undefined); diff --git a/yarn.lock b/yarn.lock index 58105e4d68..c64a2d0e41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3275,7 +3275,6 @@ __metadata: nodemon: "npm:^3.0.1" ora: "npm:^5.3.0" recursive-readdir: "npm:^2.2.2" - undici: "npm:^7.2.3" bin: backstage-create-app: bin/backstage-create-app languageName: unknown