Skip to content

Commit a18d618

Browse files
renovate[bot]github-actions[bot]ervwalter
authored
deps: update dependency jsdom to v27 (#350)
* deps: update dependency jsdom to v27 * fix: update embed-layout test for jsdom v27 compatibility jsdom v27 handles undefined style attributes differently than v26. Updated test to use getComputedStyle and check for 'none' or empty string instead of using toHaveStyle with expect.anything(). Co-authored-by: Erv Walter <ervwalter@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Erv Walter <ervwalter@users.noreply.github.com>
1 parent ddab4f9 commit a18d618

3 files changed

Lines changed: 167 additions & 116 deletions

File tree

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"eslint-plugin-react-hooks": "5.2.0",
7676
"eslint-plugin-react-refresh": "0.4.20",
7777
"globals": "16.3.0",
78-
"jsdom": "26.1.0",
78+
"jsdom": "27.0.0",
7979
"msw": "2.11.1",
8080
"prettier": "3.6.2",
8181
"prettier-plugin-tailwindcss": "0.6.14",

apps/web/src/components/embed-layout.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ describe("EmbedLayout", () => {
100100
);
101101

102102
const container = document.querySelector(".min-h-screen");
103-
expect(container).not.toHaveStyle({ maxWidth: expect.anything() });
103+
// In jsdom v27, undefined style attributes are handled differently
104+
// Check that maxWidth is either empty string or not set
105+
const style = container ? window.getComputedStyle(container) : null;
106+
expect(style?.maxWidth).toMatch(/^(none|)$/);
104107
});
105108

106109
it("renders title correctly", () => {

0 commit comments

Comments
 (0)