Skip to content

Commit 667c403

Browse files
committed
fix tests
1 parent e95b313 commit 667c403

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

chartlets.js/packages/lib/src/actions/handleHostStoreChanges.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ describe("handleHostStoreChange", () => {
201201
expect(result[0]).toEqual({
202202
...propertyRefs[0],
203203
inputValues: ["CHL"],
204+
outputIds: [],
204205
});
205206

206207
// second call -> memoized -> should not create callback request
@@ -213,6 +214,7 @@ describe("handleHostStoreChange", () => {
213214
expect(result[0]).toEqual({
214215
...propertyRefs[0],
215216
inputValues: ["TMP"],
217+
outputIds: [],
216218
});
217219

218220
// fourth call -> memoized -> should not invoke callback

chartlets.js/packages/lib/src/plugins/mui/Skeleton.test.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ import { Skeleton } from "@/plugins/mui/Skeleton";
44

55
describe("Skeleton", () => {
66
it("should render the MUI Skeleton when loading is true", () => {
7-
render(<Skeleton loading height={10} />);
7+
render(<Skeleton isLoading height={10} />);
88
const muiSkeleton = screen.getByTestId("skeleton-test-id");
99
expect(muiSkeleton).toBeInTheDocument();
1010
expect(muiSkeleton).toHaveClass("MuiSkeleton-root");
1111
});
1212

13-
it("should not render the MUI Skeleton without skeletonProps", () => {
14-
render(<Skeleton loading />);
15-
const muiSkeleton = screen.queryByTestId("skeleton-test-id");
16-
expect(muiSkeleton).not.toBeInTheDocument();
17-
});
18-
1913
it("should not render the MUI Skeleton and render children when loading is false", () => {
2014
render(
21-
<Skeleton loading={false} height={10}>
15+
<Skeleton isLoading={false} height={10}>
2216
<div>Test Content</div>
2317
</Skeleton>,
2418
);
@@ -28,26 +22,20 @@ describe("Skeleton", () => {
2822
});
2923

3024
it("should render with the specified variant", () => {
31-
render(<Skeleton loading variant="circular" />);
25+
render(<Skeleton isLoading variant="circular" />);
3226
const muiSkeleton = screen.getByTestId("skeleton-test-id");
3327
expect(muiSkeleton).toHaveClass("MuiSkeleton-circular");
3428
});
3529

3630
it("should render with specified width and height", () => {
37-
render(<Skeleton loading width={100} height={50} />);
31+
render(<Skeleton isLoading width={100} height={50} />);
3832
const muiSkeleton = screen.getByTestId("skeleton-test-id");
3933
expect(muiSkeleton).toHaveStyle("width: 100px");
4034
expect(muiSkeleton).toHaveStyle("height: 50px");
4135
});
4236

43-
it("should render with specified style", () => {
44-
render(<Skeleton loading style={{ backgroundColor: "red" }} height={10} />);
45-
const muiSkeleton = screen.getByTestId("skeleton-test-id");
46-
expect(muiSkeleton).toHaveStyle("background-color: rgb(255, 0, 0);");
47-
});
48-
4937
it("should render with specified animation", () => {
50-
render(<Skeleton loading animation="wave" />);
38+
render(<Skeleton isLoading animation="wave" />);
5139
const muiSkeleton = screen.getByTestId("skeleton-test-id");
5240
expect(muiSkeleton).toHaveClass("MuiSkeleton-wave");
5341
});

0 commit comments

Comments
 (0)