Skip to content

Commit

Permalink
ExtensionListEntry lint and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ctw-joao-luis committed Dec 18, 2024
1 parent 2295a97 commit 72a27bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ describe("ExtensionListEntry Component", () => {
const mockOnClick = jest.fn();

it("renders primary text with name and highlights search text", () => {
render(<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />);
render(
<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />,
);

const name = screen.getByText(new RegExp(mockEntry.name, "i"));
expect(name).toBeInTheDocument();
Expand All @@ -37,19 +39,21 @@ describe("ExtensionListEntry Component", () => {
});

it("renders secondary text with description and publisher", () => {
render(<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />);

render(
<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />,
);

const description = screen.getByText(new RegExp(mockEntry.description, "i"));
expect(description).toBeInTheDocument();


const publisher = screen.getByText(new RegExp(mockEntry.publisher, "i"));
expect(publisher).toBeInTheDocument();
});

it("displays version next to name", () => {
render(<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />);
render(
<ExtensionListEntry entry={mockEntry} searchText={mockEntry.name} onClick={mockOnClick} />,
);

// Check for version
const version = screen.getByText(new RegExp(mockEntry.version, "i"));
Expand Down

This file was deleted.

0 comments on commit 72a27bb

Please sign in to comment.