Skip to content

Commit 677818e

Browse files
authored
Fix typos in tests and comments (#35627)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> I just fixed typos as followings. - `succesful` → `successful` - `becuase` → `because` - `enought` → `enough` - `defualt` → `default` ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> This PR only includes test case description, dummy strings for test, and comments updates, so it has no impact on runtime behavior. Therefore, I manually reviewed changed texts to ensure correctness.
1 parent 2233b7d commit 677818e

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

compiler/packages/babel-plugin-react-compiler/src/__tests__/Logger-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import invariant from 'invariant';
1010
import {runBabelPluginReactCompiler} from '../Babel/RunReactCompilerBabelPlugin';
1111
import type {Logger, LoggerEvent} from '../Entrypoint';
1212

13-
it('logs succesful compilation', () => {
13+
it('logs successful compilation', () => {
1414
const logs: [string | null, LoggerEvent][] = [];
1515
const logger: Logger = {
1616
logEvent(filename, event) {

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5328,7 +5328,7 @@ export function writeHoistablesForBoundary(
53285328
hoistableState.stylesheets.forEach(hasStylesToHoist);
53295329

53305330
// We don't actually want to flush any hoistables until the boundary is complete so we omit
5331-
// any further writing here. This is becuase unlike Resources, Hoistable Elements act more like
5331+
// any further writing here. This is because unlike Resources, Hoistable Elements act more like
53325332
// regular elements, each rendered element has a unique representation in the DOM. We don't want
53335333
// these elements to appear in the DOM early, before the boundary has actually completed
53345334

packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9241,7 +9241,7 @@ describe('ReactDOMFizzServer', () => {
92419241

92429242
it('should always flush the boundaries contributing the preamble regardless of their size', async () => {
92439243
const longDescription =
9244-
`I need to make this segment somewhat large because it needs to be large enought to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
9244+
`I need to make this segment somewhat large because it needs to be large enough to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
92459245
92469246
Unfortunately that previous paragraph wasn't quite long enough so I'll continue with some more prose and maybe throw on some repeated additional strings at the end for good measure.
92479247
@@ -9277,7 +9277,7 @@ Unfortunately that previous paragraph wasn't quite long enough so I'll continue
92779277

92789278
it('should track byte size of shells that may contribute to the preamble when determining if the blocking render exceeds the max size', async () => {
92799279
const longDescription =
9280-
`I need to make this segment somewhat large because it needs to be large enought to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
9280+
`I need to make this segment somewhat large because it needs to be large enough to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
92819281
92829282
Unfortunately that previous paragraph wasn't quite long enough so I'll continue with some more prose and maybe throw on some repeated additional strings at the end for good measure.
92839283

packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ describe('ReactDOMServerHydration', () => {
12601260
}
12611261

12621262
// @TODO changes made to sending Fizz errors to client led to the insertion of templates in client rendered
1263-
// suspense boundaries. This leaks in this test becuase the client rendered suspense boundary appears like
1263+
// suspense boundaries. This leaks in this test because the client rendered suspense boundary appears like
12641264
// unhydrated tail nodes and this template is the first match. When we add special case handling for client
12651265
// rendered suspense boundaries this test will likely change again
12661266
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`

packages/react-reconciler/src/ReactFiberCompleteWork.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ function completeWork(
12581258
markUpdate(workInProgress);
12591259
}
12601260
} else {
1261-
// We use the updateHostComponent path becuase it produces
1261+
// We use the updateHostComponent path because it produces
12621262
// the update queue we need for Hoistables.
12631263
updateHostComponent(
12641264
current,

packages/react-server/src/ReactFizzServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export opaque type Request = {
387387
trackedPostpones: null | PostponedHoles, // Gets set to non-null while we want to track postponed holes. I.e. during a prerender.
388388
// onError is called when an error happens anywhere in the tree. It might recover.
389389
// The return string is used in production primarily to avoid leaking internals, secondarily to save bytes.
390-
// Returning null/undefined will cause a defualt error message in production
390+
// Returning null/undefined will cause a default error message in production
391391
onError: (error: mixed, errorInfo: ThrownInfo) => ?string,
392392
// onAllReady is called when all pending task is done but it may not have flushed yet.
393393
// This is a good time to start writing if you want only HTML and no intermediate steps.

0 commit comments

Comments
 (0)