You would typically do this in an afterEach block in Jasmine. Also, making separate instances of Squire.js where appropriate is acceptable.
How to run code before (or after) each test in karma
-
10-10-2022 - |
Question
I'm looking to use squire.js with karma and want to do a squire.clean() to clean away all the mocks before the next test suite (I'm using jasmine) is run but I cannot see a way to configure karma to run something before (or after) a test suite.
Is there a way?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow