import React from "react"; import { render } from "@testing-library/react"; import { Grid } from "./grid"; describe("", () => { it("renders without error", () => { render(); }); // // @ts-expect-error TS(2582): Cannot find name 'it'. Do you need to install type... Remove this comment to see the full error message // it("id, className, style is exists", () => { // const wrapper = mount( // // @ts-expect-error TS(2322): Type '{ id: string; className: string; style: { co... Remove this comment to see the full error message // , // ); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.prop("id")).toEqual("testId"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.prop("className")).toEqual("test"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.getDOMNode().style).toHaveProperty("color", "red"); // }); // // @ts-expect-error TS(2582): Cannot find name 'it'. Do you need to install type... Remove this comment to see the full error message // it("props transfer test", () => { // const wrapper = mount( // , // ); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().alignContent).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().alignItems).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().alignSelf).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp.length).toEqual(5); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].name).toEqual("header"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[0].start)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].start.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].start[0]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].start[1]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[0].end)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].end.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].end[0]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[0].end[1]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].name).toEqual("navbar"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[1].start)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].start.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].start[0]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].start[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[1].end)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].end.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].end[0]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[1].end[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].name).toEqual("main"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[2].start)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].start.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].start[0]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].start[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[2].end)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].end.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].end[0]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[2].end[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].name).toEqual("sidebar"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[3].start)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].start.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].start[0]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].start[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[3].end)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].end.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].end[0]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[3].end[1]).toEqual(1); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].name).toEqual("footer"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[4].start)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].start.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].start[0]).toEqual(0); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].start[1]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().areasProp[4].end)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].end.length).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].end[0]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().areasProp[4].end[1]).toEqual(2); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().columnsProp)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().columnsProp.length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().gridArea).toEqual("grid"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().gridColumnGap).toEqual("10px"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().gridGap).toEqual("10px"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().gridRowGap).toEqual("10px"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().heightProp).toEqual("100vh"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().justifyContent).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().justifyItems).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().justifySelf).toEqual("center"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().marginProp).toEqual("10px"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().paddingProp).toEqual("10px"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper.props().rowsProp)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().rowsProp.length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().rowsProp[0]).toEqual("auto"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().rowsProp[1]).toEqual("1fr"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().rowsProp[2]).toEqual("auto"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().tag).toEqual("div"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper.props().widthProp).toEqual("100vw"); // // @ts-expect-error TS(2322): Type '{ columnsProp: { count: number; size: string... Remove this comment to see the full error message // const wrapper2 = mount(); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(typeof wrapper.props().columnsProp).toEqual("object"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper2.props().columnsProp.count).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper2.props().columnsProp.size).toEqual("100px"); // // @ts-expect-error TS(2322): Type '{ columnsProp: string; }' is not assignable ... Remove this comment to see the full error message // const wrapper3 = mount(); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(typeof wrapper3.props().columnsProp).toEqual("string"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper3.props().columnsProp).toEqual("25%"); // // @ts-expect-error TS(2322): Type '{ rowsProp: string; }' is not assignable to ... Remove this comment to see the full error message // const wrapper4 = mount(); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(typeof wrapper4.props().rowsProp).toEqual("string"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper4.props().rowsProp).toEqual("50px"); // const wrapper5 = mount( // , // ); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper5.props().areasProp)).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp.length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper5.props().areasProp[0])).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[0].length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[0][0]).toEqual("header"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[0][1]).toEqual("header"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[0][2]).toEqual("header"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper5.props().areasProp[1])).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[1].length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[1][0]).toEqual("navbar"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[1][1]).toEqual("main"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[1][2]).toEqual("sidebar"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(Array.isArray(wrapper5.props().areasProp[2])).toEqual(true); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[2].length).toEqual(3); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[2][0]).toEqual("footer"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[2][1]).toEqual("footer"); // // @ts-expect-error TS(2304): Cannot find name 'expect'. // expect(wrapper5.props().areasProp[2][2]).toEqual("footer"); // }); // //TODO: Uncomment after fix https://github.com/styled-components/jest-styled-components/issues/294 // /* test('it applies styles', () => { // const tree = renderer.create().toJSON(); // expect(tree).toHaveStyleRule('display', 'grid'); // const tree1 = renderer.create().toJSON(); // expect(tree1).toHaveStyleRule('grid-template-columns', '200px minmax(100px,1fr) auto'); // const tree2 = renderer.create().toJSON(); // expect(tree2).toHaveStyleRule('grid-template-columns', 'repeat(auto-fill,25%)'); // const tree3 = renderer.create().toJSON(); // expect(tree3).toHaveStyleRule('grid-template-columns', 'repeat(3,100px)'); // const tree4 = renderer.create().toJSON(); // expect(tree4).toHaveStyleRule('grid-template-columns', 'repeat(3,minmax(100px,1fr))'); // const tree5 = renderer.create().toJSON(); // expect(tree5).toHaveStyleRule('grid-template-rows', '100px minmax(100px,1fr) auto'); // const tree6 = renderer.create().toJSON(); // expect(tree6).toHaveStyleRule('grid-auto-rows', '50px'); // const tree7 = renderer.create().toJSON(); // expect(tree7).toHaveStyleRule('grid-template-areas', '"header header" "navbar main"'); // const tree8 = renderer.create().toJSON(); // expect(tree8).toHaveStyleRule('grid-template-areas', '"header header header" "navbar main sidebar" "footer footer footer"'); // expect(tree8).toHaveStyleRule('grid-template-columns', 'minmax(100px,1fr) 3fr minmax(100px,1fr)'); // expect(tree8).toHaveStyleRule('grid-template-rows', 'auto 1fr auto'); // }); */ });