Skip to content

Commit

Permalink
force dom to clear after each individual test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeddelta committed Nov 13, 2024
1 parent 8ae8ac3 commit 50119a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/config/jest.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ module.exports.makePackageConfig = (dirname) => {
name: packageBaseName,
color: packageBaseName === "jspsych" ? "white" : "cyanBright",
},
setupFilesAfterEnv: ["../config/jest.setup.js"],
};
};
3 changes: 3 additions & 0 deletions packages/config/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global.afterEach(() => {
document.body.innerHTML = '';
});

0 comments on commit 50119a6

Please sign in to comment.