Files
react-native/packages/dev-middleware/src/__tests__/embedderScriptStub-test.js
T
Vitali Zaidman 3a954caf4f don't require projectRoot in devMiddleware (#53921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53921

Changelog: [Internal] `devMiddleware` removed the unused option `projectRoot`

This option was used only in a dead branch of the code inside `InspectorProxy`.

The scenario where it appeared was enabling resolving script sources (`Debugger.getScriptSource`) starting with `file://` which were coming from the file system. However, we don't seem to ever point scripts at the filesystem this way.

Reviewed By: huntie

Differential Revision: D82739662

fbshipit-source-id: 9a130eaa83cb94ae0e36a5a1102c56ff8a36cffc
2025-09-24 12:47:24 -07:00

30 lines
712 B
JavaScript

/**
* 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.
*
* @flow strict-local
* @format
*/
import {requestLocal} from './FetchUtils';
import {withServerForEachTest} from './ServerUtils';
jest.useRealTimers();
jest.setTimeout(10000);
describe('embedder script', () => {
const serverRef = withServerForEachTest({
logger: undefined,
});
test('is always served', async () => {
const resp = await requestLocal(
serverRef.serverBaseUrl +
'/debugger-frontend/embedder-static/embedderScript.js',
);
expect(resp.statusCode).toBe(200);
});
});