Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
samsam-ahmadi committed Aug 16, 2023
1 parent 1cc0de2 commit c349cd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions test-utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions test-utils/test/shared/act.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ describe('act', () => {
act(() => {
tryRenderBroken();
});
}
};

describe('synchronously', () => {
it('should rethrow the exception', () => {
Expand All @@ -407,7 +407,7 @@ describe('act', () => {
renderWorking();
expect(scratch.textContent).to.equal('1');
});

it('should not affect effects in future renders', () => {
tryRenderBroken();
renderWorking();
Expand Down

0 comments on commit c349cd9

Please sign in to comment.