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

standardize use of displayElement in tests #3486

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Conversation

jadeddelta
Copy link
Collaborator

@jadeddelta jadeddelta commented Jan 10, 2025

this PR moves any notable use of document.querySelector(...) to displayElement.querySelector(...). this is done in order to rollback the setup file for clearing the DOM after each step, which is necessary as Jest doesn't automatically do that between individual tests in a testing file. now instead of having to potentially deal with multiple jsPsych elements with unintended side effects, each tests will for sure act in their own displayElement. (closes #3434)

Copy link

changeset-bot bot commented Jan 10, 2025

🦋 Changeset detected

Latest commit: 0b78155

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@jspsych/config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jodeleeuw jodeleeuw merged commit a757ab8 into main Jan 10, 2025
4 checks passed
@jodeleeuw jodeleeuw deleted the standardize-tests branch January 10, 2025 21:24
@github-actions github-actions bot mentioned this pull request Jan 10, 2025
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.

switch testing docs to exclusively use displayElement instead of document
2 participants