From c349cd9f98a069a2eadc9791f6da7b34a1bb588f Mon Sep 17 00:00:00 2001 From: Samsam Ahmadi Date: Wed, 16 Aug 2023 20:49:23 +0200 Subject: [PATCH] prettier --- test-utils/src/index.js | 17 ++++++++++------- test-utils/test/shared/act.test.js | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test-utils/src/index.js b/test-utils/src/index.js index f8df33393dc..b6efc22d40b 100644 --- a/test-utils/src/index.js +++ b/test-utils/src/index.js @@ -35,14 +35,17 @@ export function act(cb) { try { const result = cb(); if (isThenable(result)) { - return result.then(() => { - --actDepth; - }, (e) => { - --actDepth; - throw e; - }) + return result.then( + () => { + --actDepth; + }, + e => { + --actDepth; + throw e; + } + ); } - } catch(e) { + } catch (e) { --actDepth; throw e; } diff --git a/test-utils/test/shared/act.test.js b/test-utils/test/shared/act.test.js index af9823b9062..0df1d020899 100644 --- a/test-utils/test/shared/act.test.js +++ b/test-utils/test/shared/act.test.js @@ -389,7 +389,7 @@ describe('act', () => { act(() => { tryRenderBroken(); }); - } + }; describe('synchronously', () => { it('should rethrow the exception', () => { @@ -407,7 +407,7 @@ describe('act', () => { renderWorking(); expect(scratch.textContent).to.equal('1'); }); - + it('should not affect effects in future renders', () => { tryRenderBroken(); renderWorking();