mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix eslint complains
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
parent
936de47f28
commit
2a9602e93a
@ -10,6 +10,7 @@ describe("<BottomBar />", () => {
|
||||
|
||||
it("renders w/o errors", () => {
|
||||
const { container } = render(<BottomBar />);
|
||||
|
||||
expect(container).toBeInstanceOf(HTMLElement);
|
||||
});
|
||||
|
||||
@ -28,20 +29,24 @@ describe("<BottomBar />", () => {
|
||||
it("renders items [{item: React.ReactNode}] (4.0.0-rc.1)", async () => {
|
||||
const testId = "testId";
|
||||
const text = "heee";
|
||||
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => [
|
||||
{ item: <span data-testid={testId} >{text}</span> }
|
||||
]);
|
||||
const { getByTestId } = render(<BottomBar />);
|
||||
|
||||
expect(await getByTestId(testId)).toHaveTextContent(text);
|
||||
});
|
||||
|
||||
it("renders items [{item: () => React.ReactNode}] (4.0.0-rc.1+)", async () => {
|
||||
const testId = "testId";
|
||||
const text = "heee";
|
||||
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => [
|
||||
{ item: () => <span data-testid={testId} >{text}</span> }
|
||||
]);
|
||||
const { getByTestId } = render(<BottomBar />);
|
||||
|
||||
expect(await getByTestId(testId)).toHaveTextContent(text);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user