mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
force dom to clear after each individual test case
This commit is contained in:
parent
8ae8ac3d92
commit
50119a6f5c
@ -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"],
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
3
packages/config/jest.setup.js
Normal file
3
packages/config/jest.setup.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
global.afterEach(() => {
|
||||||
|
document.body.innerHTML = '';
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user