diff --git a/CHANGELOG.md b/CHANGELOG.md index ce698c98f80e..6c66337ae8ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - `[babel-plugin-jest-hoist]` Show codeframe on static hoisting issues ([#8865](https://github.com/facebook/jest/pull/8865)) +- `[jest-circus]` Export `state` and `run` ([#8748](https://github.com/facebook/jest/pull/8748)) - `[jest-config]` [**BREAKING**] Set default display name color based on runner ([#8689](https://github.com/facebook/jest/pull/8689)) - `[jest-diff]` Add options for colors and symbols ([#8841](https://github.com/facebook/jest/pull/8841)) - `[jest-runner]` Warn if a worker had to be force exited ([#8206](https://github.com/facebook/jest/pull/8206)) diff --git a/packages/jest-circus/runner.d.ts b/packages/jest-circus/runner.d.ts new file mode 100644 index 000000000000..164bc8878c95 --- /dev/null +++ b/packages/jest-circus/runner.d.ts @@ -0,0 +1,10 @@ +import adapter = require('./build/legacy-code-todo-rewrite/jestAdapter'); +import * as circusState from './build/state'; +import circusRun from './build/run'; + +declare namespace jestCircusRunner { + export const state = circusState; + export const run = circusRun; +} + +export = jestCircusRunner; diff --git a/packages/jest-circus/runner.js b/packages/jest-circus/runner.js index cb1360dae2d9..849209acc713 100644 --- a/packages/jest-circus/runner.js +++ b/packages/jest-circus/runner.js @@ -6,5 +6,6 @@ */ // Allow people to use `jest-circus/runner` as a runner. -const runner = require('./build/legacy-code-todo-rewrite/jestAdapter'); -module.exports = runner; +module.exports = require('./build/legacy-code-todo-rewrite/jestAdapter'); +module.exports.state = require('./build/state'); +module.exports.run = require('./build/run');