diff --git a/lib/testing/helpers.ts b/lib/testing/helpers.ts index 82089313a651..09956789e23f 100644 --- a/lib/testing/helpers.ts +++ b/lib/testing/helpers.ts @@ -60,10 +60,15 @@ const defaultSharedApplication = Object.fromEntries(['CLIENT_WEBPACK_DIR'].map(k let defaultMockFactory: (original?: any) => any; let defaultAccumulateMockArgs: (mocks: Record) => Record; -export const defineDefaults = async ({ - mockFactory, - accumulateMockArgs, -}: { mockFactory?: any; accumulateMockArgs?: (mock: Record) => Record } = {}) => { +export const defineDefaults = async ( + defaults: { + /** @deprecated mock from `node:test` is used internally */ + mockFactory?: any; + /** @deprecated mock from `node:test` is used internally */ + accumulateMockArgs?: (mock: Record) => Record; + } = {}, +) => { + const { mockFactory, accumulateMockArgs } = defaults; if (mockFactory) { defaultMockFactory = mockFactory; } else if (!defaultMockFactory) {