Skip to content

Commit

Permalink
Replace context with describe
Browse files Browse the repository at this point in the history
The Preact tests generally don't use `context` blocks and the ESLint rules
don't know to treat a `context` block like `describe` (see
jest-community/eslint-plugin-jest#83)
  • Loading branch information
robertknight committed Mar 31, 2020
1 parent 4efcd75 commit b042875
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test-utils/test/shared/act.test.js
Expand Up @@ -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');
}
Expand Down Expand Up @@ -385,7 +385,7 @@ describe('act', () => {
} catch (e) {}
};

context('synchronously', () => {
describe('synchronously', () => {
it('should rethrow the exception', () => {
expect(renderBroken).to.throw('BrokenWidget is broken');
});
Expand All @@ -403,7 +403,7 @@ describe('act', () => {
});
});

context('asynchronously', () => {
describe('asynchronously', () => {
const renderBrokenAsync = async () => {
await act(async () => {
render(<BrokenWidget />, scratch);
Expand Down Expand Up @@ -439,7 +439,7 @@ describe('act', () => {
});
});

context('in an effect', () => {
describe('in an effect', () => {
function BrokenEffect() {
useEffect(() => {
throw new Error('BrokenEffect effect');
Expand Down

0 comments on commit b042875

Please sign in to comment.