mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix eslint errors
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
parent
92b928e76f
commit
936de47f28
@ -2,11 +2,11 @@ import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
|
||||
import { BottomBar } from './bottom-bar'
|
||||
import { BottomBar } from "./bottom-bar";
|
||||
jest.mock("../../../extensions/registries");
|
||||
import { statusBarRegistry } from "../../../extensions/registries";
|
||||
|
||||
describe('<BottomBar />', () => {
|
||||
describe("<BottomBar />", () => {
|
||||
|
||||
it("renders w/o errors", () => {
|
||||
const { container } = render(<BottomBar />);
|
||||
@ -21,13 +21,13 @@ describe('<BottomBar />', () => {
|
||||
expect(() => render(<BottomBar />)).not.toThrow();
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => []);
|
||||
expect(() => render(<BottomBar />)).not.toThrow();
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => { return {}});
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => { return {};});
|
||||
expect(() => render(<BottomBar />)).not.toThrow();
|
||||
});
|
||||
|
||||
it("renders items [{item: React.ReactNode}] (4.0.0-rc.1)", async () => {
|
||||
const testId = 'testId'
|
||||
const text = 'heee'
|
||||
const testId = "testId";
|
||||
const text = "heee";
|
||||
statusBarRegistry.getItems = jest.fn().mockImplementationOnce(() => [
|
||||
{ item: <span data-testid={testId} >{text}</span> }
|
||||
]);
|
||||
@ -36,12 +36,12 @@ describe('<BottomBar />', () => {
|
||||
});
|
||||
|
||||
it("renders items [{item: () => React.ReactNode}] (4.0.0-rc.1+)", async () => {
|
||||
const testId = 'testId'
|
||||
const text = 'heee'
|
||||
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