Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headless render tests using JSDOM. #629

Merged
merged 6 commits into from
Dec 16, 2024
Merged

Add headless render tests using JSDOM. #629

merged 6 commits into from
Dec 16, 2024

Conversation

jheer
Copy link
Member

@jheer jheer commented Dec 14, 2024

  • Add pending result property to MosaicClient to aid status tracking.
  • Add headless render tests using JSDOM to vgplot package.

@jheer jheer marked this pull request as ready for review December 16, 2024 17:14
@jheer jheer requested a review from domoritz December 16, 2024 17:14
const el = await run(createAPIContext({ coordinator: mc }));

await clientsReady(el);
expect(el.outerHTML).toEqual(expected);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easier to use toMatchSnapshot (https://vitest.dev/guide/snapshot) especially if we want to add more tests like this in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh neat. This looks like the right method to use in the future: https://vitest.dev/guide/snapshot#file-snapshots

@jheer jheer merged commit 9bebdc3 into main Dec 16, 2024
3 checks passed
@jheer jheer deleted the jh/test-render branch December 16, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants