Skip to content

Commit

Permalink
typo fix for the word 'Psuedo' (#20894)
Browse files Browse the repository at this point in the history
Co-authored-by: Bowen Li <bowen31337@gmail.com>
  • Loading branch information
bowen31337 and Bowen Li authored Feb 26, 2021
1 parent 0cf9fc1 commit 38f392c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('ReactDOMTestSelectors', () => {

let act;
let createComponentSelector;
let createHasPsuedoClassSelector;
let createHasPseudoClassSelector;
let createRoleSelector;
let createTextSelector;
let createTestNameSelector;
Expand All @@ -35,7 +35,7 @@ describe('ReactDOMTestSelectors', () => {
const ReactDOM = require('react-dom/testing');
act = ReactDOM.act;
createComponentSelector = ReactDOM.createComponentSelector;
createHasPsuedoClassSelector = ReactDOM.createHasPsuedoClassSelector;
createHasPseudoClassSelector = ReactDOM.createHasPseudoClassSelector;
createRoleSelector = ReactDOM.createRoleSelector;
createTextSelector = ReactDOM.createTextSelector;
createTestNameSelector = ReactDOM.createTestNameSelector;
Expand Down Expand Up @@ -454,7 +454,7 @@ describe('ReactDOMTestSelectors', () => {
const matches = findAllNodes(document.body, [
createComponentSelector(Example),
createRoleSelector('article'),
createHasPsuedoClassSelector([
createHasPseudoClassSelector([
createRoleSelector('heading'),
createTextSelector('Should match'),
]),
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/testing.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './index.classic.fb.js';
export {
act,
createComponentSelector,
createHasPsuedoClassSelector,
createHasPseudoClassSelector,
createRoleSelector,
createTestNameSelector,
createTextSelector,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './index.js';
export {
act,
createComponentSelector,
createHasPsuedoClassSelector,
createHasPseudoClassSelector,
createRoleSelector,
createTestNameSelector,
createTextSelector,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/testing.modern.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './index.modern.fb.js';
export {
act,
createComponentSelector,
createHasPsuedoClassSelector,
createHasPseudoClassSelector,
createRoleSelector,
createTestNameSelector,
createTextSelector,
Expand Down
10 changes: 5 additions & 5 deletions packages/react-reconciler/src/ReactFiberReconciler.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
act as act_old,
createPortal as createPortal_old,
createComponentSelector as createComponentSelector_old,
createHasPsuedoClassSelector as createHasPsuedoClassSelector_old,
createHasPseudoClassSelector as createHasPseudoClassSelector_old,
createRoleSelector as createRoleSelector_old,
createTestNameSelector as createTestNameSelector_old,
createTextSelector as createTextSelector_old,
Expand Down Expand Up @@ -84,7 +84,7 @@ import {
act as act_new,
createPortal as createPortal_new,
createComponentSelector as createComponentSelector_new,
createHasPsuedoClassSelector as createHasPsuedoClassSelector_new,
createHasPseudoClassSelector as createHasPseudoClassSelector_new,
createRoleSelector as createRoleSelector_new,
createTestNameSelector as createTestNameSelector_new,
createTextSelector as createTextSelector_new,
Expand Down Expand Up @@ -190,9 +190,9 @@ export const IdleEventPriority = enableNewReconciler
: IdleEventPriority_old;

//TODO: "psuedo" is spelled "pseudo"
export const createHasPsuedoClassSelector = enableNewReconciler
? createHasPsuedoClassSelector_new
: createHasPsuedoClassSelector_old;
export const createHasPseudoClassSelector = enableNewReconciler
? createHasPseudoClassSelector_new
: createHasPseudoClassSelector_old;
export const createRoleSelector = enableNewReconciler
? createRoleSelector_new
: createRoleSelector_old;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberReconciler.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export {registerMutableSourceForHydration} from './ReactMutableSource.new';
export {createPortal} from './ReactPortal';
export {
createComponentSelector,
createHasPsuedoClassSelector,
createHasPseudoClassSelector,
createRoleSelector,
createTestNameSelector,
createTextSelector,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberReconciler.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export {registerMutableSourceForHydration} from './ReactMutableSource.old';
export {createPortal} from './ReactPortal';
export {
createComponentSelector,
createHasPsuedoClassSelector,
createHasPseudoClassSelector,
createRoleSelector,
createTestNameSelector,
createTextSelector,
Expand Down
10 changes: 5 additions & 5 deletions packages/react-reconciler/src/ReactTestSelectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type ComponentSelector = {|
value: React$AbstractComponent<empty, mixed>,
|};

type HasPsuedoClassSelector = {|
type HasPseudoClassSelector = {|
$$typeof: Type,
value: Array<Selector>,
|};
Expand All @@ -69,7 +69,7 @@ type TestNameSelector = {|

type Selector =
| ComponentSelector
| HasPsuedoClassSelector
| HasPseudoClassSelector
| RoleSelector
| TextSelector
| TestNameSelector;
Expand All @@ -83,9 +83,9 @@ export function createComponentSelector(
};
}

export function createHasPsuedoClassSelector(
export function createHasPseudoClassSelector(
selectors: Array<Selector>,
): HasPsuedoClassSelector {
): HasPseudoClassSelector {
return {
$$typeof: HAS_PSEUDO_CLASS_TYPE,
value: selectors,
Expand Down Expand Up @@ -143,7 +143,7 @@ function matchSelector(fiber: Fiber, selector: Selector): boolean {
case HAS_PSEUDO_CLASS_TYPE:
return hasMatchingPaths(
fiber,
((selector: any): HasPsuedoClassSelector).value,
((selector: any): HasPseudoClassSelector).value,
);
case ROLE_TYPE:
if (fiber.tag === HostComponent) {
Expand Down

0 comments on commit 38f392c

Please sign in to comment.