Skip to content

Commit

Permalink
Capitalize the default Flight environment (facebook#28402)
Browse files Browse the repository at this point in the history
It's cleaner and more in line with how we style other badges like "Memo"
and "ForwardRef" in DevTools.
  • Loading branch information
sebmarkbage authored and AndyPengc12 committed Apr 15, 2024
1 parent 97634ba commit 88c9599
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/react-client/src/__tests__/ReactFlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('ReactFlight', () => {
const rootModel = await ReactNoopFlightClient.read(transport);
const greeting = rootModel.greeting;
expect(greeting._debugInfo).toEqual(
__DEV__ ? [{name: 'Greeting', env: 'server'}] : undefined,
__DEV__ ? [{name: 'Greeting', env: 'Server'}] : undefined,
);
ReactNoop.render(greeting);
});
Expand All @@ -224,7 +224,7 @@ describe('ReactFlight', () => {
await act(async () => {
const promise = ReactNoopFlightClient.read(transport);
expect(promise._debugInfo).toEqual(
__DEV__ ? [{name: 'Greeting', env: 'server'}] : undefined,
__DEV__ ? [{name: 'Greeting', env: 'Server'}] : undefined,
);
ReactNoop.render(await promise);
});
Expand Down Expand Up @@ -1970,7 +1970,7 @@ describe('ReactFlight', () => {
await act(async () => {
const promise = ReactNoopFlightClient.read(transport);
expect(promise._debugInfo).toEqual(
__DEV__ ? [{name: 'ServerComponent', env: 'server'}] : undefined,
__DEV__ ? [{name: 'ServerComponent', env: 'Server'}] : undefined,
);
const result = await promise;
const thirdPartyChildren = await result.props.children[1];
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export function createRequest(
}: any);
if (__DEV__) {
request.environmentName =
environmentName === undefined ? 'server' : environmentName;
environmentName === undefined ? 'Server' : environmentName;
}
const rootTask = createTask(request, model, null, false, abortSet);
pingedTasks.push(rootTask);
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/__tests__/ReactFetch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('ReactFetch', () => {
const promise = render(Component);
expect(await promise).toMatchInlineSnapshot(`"GET world []"`);
expect(promise._debugInfo).toEqual(
__DEV__ ? [{name: 'Component', env: 'server'}] : undefined,
__DEV__ ? [{name: 'Component', env: 'Server'}] : undefined,
);
expect(fetchCount).toBe(1);
});
Expand Down

0 comments on commit 88c9599

Please sign in to comment.