/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/dev-middleware/src/utils/__mocks__/DefaultToolLauncher.js
23 строки
662 B
Alex Hunt
Add module mock for DefaultToolLauncher and apply in tests (#55728)
26 фев 2026, 23:12
26 фев 2026, 23:12
703fe8b
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @noflow * @format */ /** * Mock implementation of DefaultToolLauncher to prevent actual browser * and debugger-shell launches during tests. */ const DefaultToolLauncher = { launchDebuggerAppWindow: jest .fn() .mockImplementation(() => Promise.resolve()), launchDebuggerShell: jest.fn().mockImplementation(() => Promise.resolve()), prepareDebuggerShell: jest.fn().mockResolvedValue({code: 'not_implemented'}), }; export default DefaultToolLauncher;