forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
default embedder script for open-source (facebook#46302)
Summary: Pull Request resolved: facebook#46302 Changelog: [General][Fixed] - Removed noisy ENOENT error message upon launching the debugger As described in T200199544, Metro terminal in open-source would show an error message for the missing embedder script. In this diff, we add a response of an empty file to open-source (no-op) Reviewed By: hoxyq Differential Revision: D62103015 fbshipit-source-id: 219bc398b7786527db00528cca175adc13a527a0
- Loading branch information
1 parent
3350050
commit 5bbf5a4
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
packages/dev-middleware/src/__tests__/embedderScriptStub-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* 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 | ||
* @oncall react_native | ||
*/ | ||
|
||
import {fetchLocal} from './FetchUtils'; | ||
import {withServerForEachTest} from './ServerUtils'; | ||
|
||
jest.useRealTimers(); | ||
jest.setTimeout(10000); | ||
|
||
describe('embedder script', () => { | ||
const serverRef = withServerForEachTest({ | ||
logger: undefined, | ||
projectRoot: '', | ||
}); | ||
|
||
test('is always served', async () => { | ||
const resp = await fetchLocal( | ||
serverRef.serverBaseUrl + | ||
'/debugger-frontend/embedder-static/embedderScript.js', | ||
); | ||
expect(resp.ok).toBeTruthy(); | ||
expect(resp.status).toBe(200); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters