Skip to content

Commit

Permalink
export expect from jest-circus as well for easy import
Browse files Browse the repository at this point in the history
- so all the test globals (except for 'jest') can be imported from
  jest-circus, no need to import from 'expect' as well
  - jest-circus sets the expect global, so would make sense that you
    could import from it as well
  • Loading branch information
agilgur5 committed Dec 15, 2019
1 parent 5915a15 commit f7d9db1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/jest-circus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {ErrorWithStack, isPromise} from 'jest-util';
import {Circus, Global} from '@jest/types';
import {dispatch} from './state';

import expect = require('expect');

type THook = (fn: Circus.HookFn, timeout?: number) => void;
type DescribeFn = (
blockName: Circus.BlockName,
Expand Down Expand Up @@ -215,6 +217,7 @@ export {
beforeAll,
beforeEach,
describe,
expect,
fdescribe,
fit,
it,
Expand All @@ -229,6 +232,7 @@ export default {
beforeAll,
beforeEach,
describe,
expect,
fdescribe,
fit,
it,
Expand Down

0 comments on commit f7d9db1

Please sign in to comment.