Skip to content

Commit

Permalink
chore(typos): fix additional typos throughout repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed May 5, 2022
1 parent 453023b commit ef20132
Show file tree
Hide file tree
Showing 48 changed files with 67 additions and 69 deletions.
6 changes: 3 additions & 3 deletions packages/alert/src/__tests__/useMessageQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("handleAddMessage", () => {

it("should add the new message to the end of the queue if there are no existing messages with the same id", () => {
const replacement: Message = {
messageId: "mesage-3",
messageId: "message-3",
messagePriority: "replace",
};

Expand Down Expand Up @@ -315,7 +315,7 @@ describe("handleAddMessage", () => {
});
});

describe("immediate pirority", () => {
describe("immediate priority", () => {
const message1: Message = { messageId: "message-1" };
const message2: Message = { messageId: "message-2" };
const message3: Message = { messageId: "message-3" };
Expand Down Expand Up @@ -355,7 +355,7 @@ describe("reducer", () => {
const message2: Message = { messageId: "message-2" };
const message3: ToastMessage = { children: "Hello, world!" };

it("should add a new messaage with the correct behavior for the ADD_MESSAGE action", () => {
it("should add a new message with the correct behavior for the ADD_MESSAGE action", () => {
const action: AddMessageAction = {
type: ADD_MESSAGE,
message: message3,
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete/src/__tests__/HighlightedResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("HighlightedResult", () => {
expect(container).toMatchSnapshot();

// one for the TextNode of unmatched prefix, one <span> for the highlighted
// text, and the reamining TextNode for the unmatched suffix
// text, and the remaining TextNode for the unmatched suffix
expect(container.childNodes.length).toBe(3);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/avatar/src/__tests__/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Avatar", () => {
expect(container.querySelector("span")).not.toBeNull();
});

it("should apply the rmd-avarar class name", () => {
it("should apply the rmd-avatar class name", () => {
const { container } = render(<Avatar />);
const avatar = container.querySelector("span") as HTMLSpanElement;
expect(avatar.className).toBe("rmd-avatar");
Expand Down
2 changes: 1 addition & 1 deletion packages/badge/src/__tests__/isEmpty.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isEmpty } from "../isEmpty";

describe("isEmpty", () => {
it('should return true whent he disableNullOnZero is false and the children is 0, "0", or null', () => {
it('should return true when the disableNullOnZero is false and the children is 0, "0", or null', () => {
expect(isEmpty(0, false)).toBe(true);
expect(isEmpty("0", false)).toBe(true);
expect(isEmpty(null, false)).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion packages/button/src/__tests__/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function flattenDeep(
}

describe("Button", () => {
// this is actually really bad practice and kind of worthess
// this is actually really bad practice and kind of worthless
it("should render correctly based on the theme props", () => {
flattenDeep(
buttonTypes.map((buttonType) =>
Expand Down
4 changes: 2 additions & 2 deletions packages/dialog/src/__tests__/useNestedDialogFixes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("useNestedDialogFixes", () => {

it("should warn in a non-prod environment if trying to add multiple dialogs with the same id", () => {
const { NODE_ENV } = process.env;
// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = "production";
const warn = jest.spyOn(console, "warn");
Expand Down Expand Up @@ -115,7 +115,7 @@ describe("useNestedDialogFixes", () => {
unmount();
expect(warn).not.toBeCalled();

// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = NODE_ENV;
render(<Test />);
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/menu/__tests__/MenuItemTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe("MenuItemTextField", () => {
expect(menu).not.toBeInTheDocument();
});

it("should not cause the menu to close when the text fiedl or li is clicked", () => {
it("should not cause the menu to close when the text field or li is clicked", () => {
const { getByRole, getByTestId } = render(<Test />);
fireEvent.click(getByRole("button", { name: "Dropdown" }));

Expand Down
4 changes: 2 additions & 2 deletions packages/form/src/select/__tests__/Listbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe("Listbox", () => {

it("should throw a warning in a non-production NODE_ENV if there is a non-searchable value", () => {
const { NODE_ENV } = process.env;
// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = "production";
const warn = jest.spyOn(console, "warn");
Expand All @@ -288,7 +288,7 @@ describe("Listbox", () => {
unmount();
expect(warn).not.toBeCalled();

// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = NODE_ENV;
render(<Listbox {...props} />);
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/slider/__tests__/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ describe("Slider", () => {
);
}

it("should show the toolwip when the thumb gains focus while the user interaction mode is keyboard", async () => {
it("should show the tooltip when the thumb gains focus while the user interaction mode is keyboard", async () => {
const { getByRole, container } = render(<DiscreteTest />);
expect(container).toMatchSnapshot();
expect(() => getByRole("tooltip")).toThrow();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Slider discrete sliders should show the toolwip when the thumb gains focus while the user interaction mode is keyboard 1`] = `
exports[`Slider discrete sliders should show the tooltip when the thumb gains focus while the user interaction mode is keyboard 1`] = `
<div>
<span
class="rmd-label"
Expand Down Expand Up @@ -36,7 +36,7 @@ exports[`Slider discrete sliders should show the toolwip when the thumb gains fo
</div>
`;

exports[`Slider discrete sliders should show the toolwip when the thumb gains focus while the user interaction mode is keyboard 2`] = `
exports[`Slider discrete sliders should show the tooltip when the thumb gains focus while the user interaction mode is keyboard 2`] = `
<div>
<span
class="rmd-label"
Expand Down Expand Up @@ -79,7 +79,7 @@ exports[`Slider discrete sliders should show the toolwip when the thumb gains fo
</div>
`;

exports[`Slider discrete sliders should show the toolwip when the thumb gains focus while the user interaction mode is keyboard 3`] = `
exports[`Slider discrete sliders should show the tooltip when the thumb gains focus while the user interaction mode is keyboard 3`] = `
<div>
<span
class="rmd-label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe("PasswordWithMessage", () => {
expect(message.className).toContain("--error");
});

it("should not update the error state on change or update the value if the custon onChange event stopped propagation", () => {
it("should not update the error state on change or update the value if the custom onChange event stopped propagation", () => {
const { getByPlaceholderText, getByRole } = render(
<Test
minLength={10}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe("TextAreaWithMessage", () => {
expect(message.className).toContain("--error");
});

it("should not update the error state on change or update the value if the custon onChange event stopped propagation", () => {
it("should not update the error state on change or update the value if the custom onChange event stopped propagation", () => {
const { getByRole } = render(
<Test
maxLength={3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe("TextFieldWithMessage", () => {
expect(message.className).toContain("--error");
});

it("should not update the error state on change or update the value if the custon onChange event stopped propagation", () => {
it("should not update the error state on change or update the value if the custom onChange event stopped propagation", () => {
const { getByRole } = render(
<Test
minLength={10}
Expand Down
4 changes: 2 additions & 2 deletions packages/form/src/text-field/__tests__/getErrorMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("defaultGetErrorMessage", () => {
).toBe("");
});

it("should only return the validity message when the validateOnChange is set to recommeded and one of the RECOMMENDED_STATE_KEYS are errored", () => {
it("should only return the validity message when the validateOnChange is set to recommended and one of the RECOMMENDED_STATE_KEYS are errored", () => {
const validate = (key: keyof ValidityState, expected: string): void => {
expect(
defaultGetErrorMessage({
Expand All @@ -108,7 +108,7 @@ describe("defaultGetErrorMessage", () => {
validate("valueMissing", validationMessage);
});

it("should only return the validity message when the validateOnChange is set to recommeded and one of the RECOMMENDED_NUMBER_STATE_KEYS are errored", () => {
it("should only return the validity message when the validateOnChange is set to recommended and one of the RECOMMENDED_NUMBER_STATE_KEYS are errored", () => {
const validate = (key: keyof ValidityState, expected: string): void => {
expect(
defaultGetErrorMessage({
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/toggle/__tests__/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("Switch", () => {
expect(container).toMatchSnapshot();
});

it("should be able to render the children within the switch's ball hiden label", () => {
it("should be able to render the children within the switch's ball hidden label", () => {
const { container } = render(
<Switch id="switch" label="Label">
<span>Content</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Switch should be able to render the children within the switch's ball hiden label 1`] = `
exports[`Switch should be able to render the children within the switch's ball hidden label 1`] = `
<div>
<div
class="rmd-toggle-container rmd-switch-container"
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/toggle/__tests__/useChecked.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("useChecked", () => {
expect(input.checked).toBe(true);
});

it("should call the provied onChange handler", () => {
it("should call the provided onChange handler", () => {
const onChange = jest.fn();
const { getByTestId } = render(
<Test defaultChecked={false} onChange={onChange} />
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/src/__tests__/IconRotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("IconRotator", () => {
expect(container).toMatchSnapshot();
});

it("should wrapp the children with a span if the forceIconWrap prop is enabled", () => {
it("should wrap the children with a span if the forceIconWrap prop is enabled", () => {
const { container, rerender } = render(
<IconRotator rotated={false} forceIconWrap>
<Icon />
Expand Down
12 changes: 6 additions & 6 deletions packages/icon/src/__tests__/__snapshots__/IconRotator.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ exports[`IconRotator should work automatically with the SVGIcon component 2`] =
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 1`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 1`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate"
Expand All @@ -85,7 +85,7 @@ exports[`IconRotator should wrapp the children with a span if the forceIconWrap
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 2`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 2`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate rmd-icon-rotator--rotated"
Expand All @@ -98,7 +98,7 @@ exports[`IconRotator should wrapp the children with a span if the forceIconWrap
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 3`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 3`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate"
Expand All @@ -113,7 +113,7 @@ exports[`IconRotator should wrapp the children with a span if the forceIconWrap
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 4`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 4`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate rmd-icon-rotator--rotated"
Expand All @@ -128,7 +128,7 @@ exports[`IconRotator should wrapp the children with a span if the forceIconWrap
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 5`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 5`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate"
Expand All @@ -148,7 +148,7 @@ exports[`IconRotator should wrapp the children with a span if the forceIconWrap
</div>
`;

exports[`IconRotator should wrapp the children with a span if the forceIconWrap prop is enabled 6`] = `
exports[`IconRotator should wrap the children with a span if the forceIconWrap prop is enabled 6`] = `
<div>
<span
class="rmd-icon-rotator rmd-icon-rotator--animate rmd-icon-rotator--rotated"
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/__tests__/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ describe("Layout", () => {
expect(() => getByRole("dialog")).toThrow();
});

it("should allow the visibility to be controled with the showNav and hideNav functions", async () => {
it("should allow the visibility to be controlled with the showNav and hideNav functions", async () => {
const { getByRole } = render(
<Test>
<Actions />
Expand Down
4 changes: 2 additions & 2 deletions packages/link/src/__tests__/SkipToMainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ describe("SkipToMainContent", () => {
describe("prod", () => {
const env = process.env.NODE_ENV;
beforeAll(() => {
// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = "production";
});

afterAll(() => {
// this is caused by next definigin process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// this is caused by next defining process.env.NODE_ENV as readonly 'development' | 'production' | 'test'
// @ts-expect-error
process.env.NODE_ENV = env;
});
Expand Down
4 changes: 2 additions & 2 deletions packages/menu/src/__tests__/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe("DropdownMenu", () => {
expect(menu).toBeInTheDocument();
});

it("should not close the menu if the menu's onClick eventhandler calls event.stopPropagation()", () => {
it("should not close the menu if the menu's onClick event handler calls event.stopPropagation()", () => {
function Test(): ReactElement {
return (
<DropdownMenu
Expand Down Expand Up @@ -541,7 +541,7 @@ describe("DropdownMenu", () => {
expect(document.activeElement).toBe(item2);
});

it("should not open the submenu when the ArrowRight key is pressed if the menuitem is disabled or the onKeyDown event handler calls event.stopPropagaion()", () => {
it("should not open the submenu when the ArrowRight key is pressed if the menuitem is disabled or the onKeyDown event handler calls event.stopPropagation()", () => {
function Test(): ReactElement {
return (
<DropdownMenu
Expand Down
2 changes: 1 addition & 1 deletion packages/menu/src/__tests__/MenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ describe("MenuBar", () => {
expect(document.body).toMatchSnapshot();
});

it("should not enable the hover mode if the menubutton calls event.stopPropagaion() or is disabled", () => {
it("should not enable the hover mode if the menubutton calls event.stopPropagation() or is disabled", () => {
const onMouseLeave = jest.fn();
const { getByRole } = render(
<Test
Expand Down
2 changes: 1 addition & 1 deletion packages/progress/src/__tests__/CircularProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("CircularProgress", () => {

it("should support a small variant", () => {
const { getByRole, rerender } = render(
<CircularProgress id="small=pgoress" small />
<CircularProgress id="small-progress" small />
);
const progress = getByRole("progressbar");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ exports[`CircularProgress should support a small variant 1`] = `
aria-valuemax="100"
aria-valuemin="0"
class="rmd-circular-progress rmd-circular-progress--centered rmd-circular-progress--small"
id="small=pgoress"
id="small-progress"
role="progressbar"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion packages/states/src/__tests__/useKeyboardClickPolyfill.tsx