* Cleans up global state added during tests. * @return {Promise }
()
| 159 | * @return {Promise<void>} |
| 160 | */ |
| 161 | async function cleanupTestcase() { |
| 162 | await flushPreactEffects(); |
| 163 | setTestRunner(this); |
| 164 | restoreConsoleSandbox(); |
| 165 | restoreAsyncErrorThrows(); |
| 166 | restoreConsoleError(); |
| 167 | restoreLogger(); |
| 168 | cleanupTestPageElements(); |
| 169 | resetWindowState(); |
| 170 | setDefaultBootstrapBaseUrlForTesting(null); |
| 171 | resetAccumulatedErrorMessagesForTesting(); |
| 172 | resetExperimentTogglesForTesting(window); |
| 173 | resetEvtListenerOptsSupportForTesting(); |
| 174 | cancelTimersForTesting(); |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Cleans up any HTML elements that tests might have added to the document. |
nothing calls this directly
no test coverage detected