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 14, 2019
1 parent e6a52ae commit 7b5ea57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/jest-circus/src/index.ts
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 @@ -221,6 +223,7 @@ export {
xdescribe,
fit,
fdescribe,
expect,
};
export default {
afterAll,
Expand All @@ -235,4 +238,5 @@ export default {
xdescribe,
fit,
fdescribe,
expect,
};

0 comments on commit 7b5ea57

Please sign in to comment.