force dom to clear after each individual test case

This commit is contained in:
jade 2024-11-13 10:46:26 -05:00
parent 8ae8ac3d92
commit 50119a6f5c
2 changed files with 4 additions and 0 deletions

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 = '';
});