Merge pull request #3435 from jspsych/per-test-dom-reset

force dom to clear after each individual test case
This commit is contained in:
Josh de Leeuw 2024-11-30 10:15:15 -05:00 committed by GitHub
commit 6c4c5ba02a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"@jspsych/config": minor
---
update to force the dom to clear after each individual test

View File

@ -19,5 +19,6 @@ module.exports.makePackageConfig = (dirname) => {
name: packageBaseName, name: packageBaseName,
color: packageBaseName === "jspsych" ? "white" : "cyanBright", color: packageBaseName === "jspsych" ? "white" : "cyanBright",
}, },
setupFilesAfterEnv: ["../config/jest.setup.js"],
}; };
}; };

View File

@ -0,0 +1,3 @@
global.afterEach(() => {
document.body.innerHTML = '';
});