From b042875b35c9a46c2bdd0bcdba51e5c9ca548042 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Tue, 31 Mar 2020 17:12:50 +0100 Subject: [PATCH] Replace `context` with `describe` The Preact tests generally don't use `context` blocks and the ESLint rules don't know to treat a `context` block like `describe` (see https://github.com/jest-community/eslint-plugin-jest/issues/83) --- test-utils/test/shared/act.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-utils/test/shared/act.test.js b/test-utils/test/shared/act.test.js index e911416652..7769b5b625 100644 --- a/test-utils/test/shared/act.test.js +++ b/test-utils/test/shared/act.test.js @@ -342,7 +342,7 @@ describe('act', () => { }); }); - context('when `act` callback throws an exception', () => { + describe('when `act` callback throws an exception', () => { function BrokenWidget() { throw new Error('BrokenWidget is broken'); } @@ -385,7 +385,7 @@ describe('act', () => { } catch (e) {} }; - context('synchronously', () => { + describe('synchronously', () => { it('should rethrow the exception', () => { expect(renderBroken).to.throw('BrokenWidget is broken'); }); @@ -403,7 +403,7 @@ describe('act', () => { }); }); - context('asynchronously', () => { + describe('asynchronously', () => { const renderBrokenAsync = async () => { await act(async () => { render(, scratch); @@ -439,7 +439,7 @@ describe('act', () => { }); }); - context('in an effect', () => { + describe('in an effect', () => { function BrokenEffect() { useEffect(() => { throw new Error('BrokenEffect effect');