Skip to content

Commit

Permalink
deps(website): update headlessui and add jsdom polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Sep 11, 2024
1 parent 9d20f17 commit dac2a7b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
38 changes: 34 additions & 4 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@astrojs/mdx": "^3.1.5",
"@astrojs/node": "^8.3.3",
"@emotion/react": "^11.13.3",
"@headlessui/react": "^2.1.4",
"@headlessui/react": "^2.1.7",
"@mui/material": "~5.14.20",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
Expand Down Expand Up @@ -85,6 +85,7 @@
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"jsdom": "^25.0.0",
"jsdom-testing-mocks": "^1.13.1",
"msw": "^2.4.1",
"prettier": "3.3.3",
"prettier-plugin-astro": "^0.14.1",
Expand Down
5 changes: 5 additions & 0 deletions website/vitest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import '@testing-library/jest-dom';

import { HttpStatusCode } from 'axios';
import { mockAnimationsApi } from 'jsdom-testing-mocks';
import { http } from 'msw';
import { setupServer } from 'msw/node';
import ResizeObserver from 'resize-observer-polyfill';
Expand Down Expand Up @@ -38,6 +39,10 @@ export const testConfig = {
// See https://github.com/tailwindlabs/headlessui/issues/3268
vi.stubGlobal('ResizeObserver', ResizeObserver);

// Mocking necessary since headlessui v2.1.5
// See https://github.com/tailwindlabs/headlessui/issues/3469
mockAnimationsApi();

export const metadataKey = 'originalMetaDataField';
export const editableEntry = 'originalMetaDataValue';
export const defaultReviewData: SequenceEntryToEdit = {
Expand Down

0 comments on commit dac2a7b

Please sign in to comment.