Skip to content

Commit 050cc53

Browse files
committed
Debug flaky jest test
Signed-off-by: Michael Telatynski <[email protected]>
1 parent a3f5d20 commit 050cc53

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const config: Config = {
5858

5959
// if we're running under GHA, enable the GHA reporter
6060
if (env["GITHUB_ACTIONS"] !== undefined) {
61-
const reporters: Config["reporters"] = [["github-actions", { silent: false }], "summary"];
61+
const reporters: Config["reporters"] = [["github-actions", { silent: false }], "default", "summary"];
6262

6363
// if we're running against the develop branch, also enable the slow test reporter
6464
if (env["GITHUB_REF"] == "refs/heads/develop") {

src/Lifecycle.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,8 @@ export async function onLoggedOut(): Promise<void> {
11161116
* @returns {Promise} promise which resolves once the stores have been cleared
11171117
*/
11181118
async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void> {
1119+
logger.info(`Clearing storage, deleteEverything=${opts?.deleteEverything}`);
1120+
11191121
if (window.localStorage) {
11201122
// get the currently defined device language, if set, so we can restore it later
11211123
const language = SettingsStore.getValueAt(SettingLevel.DEVICE, "language", null, true, true);

test/unit-tests/components/structures/MatrixChat-test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ describe("<MatrixChat />", () => {
262262
act(() => defaultDispatcher.dispatch({ action: Action.OnLoggedOut }, true));
263263

264264
localStorage.clear();
265+
Lifecycle.setSessionLockNotStolen();
265266
});
266267

267268
resetJsDomAfterEach();

0 commit comments

Comments
 (0)