Skip to content

Commit

Permalink
better test
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Dec 5, 2024
1 parent c619f17 commit a5f5b14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next-yak/runtime/__tests__/styled.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ describe("dev mode - error tests", () => {
it("should show the function body in error message when dynamic css function returns invalid value", () => {
const Component = styled.div("cssClass", {
style: {
"--bar": ({ $groupColor }) => $groupColor && css("color-class"),
"--bar": ({ $groupColor }) => $groupColor,
},
});

Expand All @@ -354,7 +354,7 @@ describe("dev mode - error tests", () => {
expect(error).toMatchInlineSnapshot(`
[Error: Dynamic CSS functions must return a string or number but returned undefined
Dynamic CSS function: ({ $groupColor }) => $groupColor && __vite_ssr_import_4__.css("color-class")
Dynamic CSS function: ({ $groupColor }) => $groupColor
]
`);
});
Expand Down

0 comments on commit a5f5b14

Please sign in to comment.