Skip to content

Commit

Permalink
Make the jest-circus export compatible with regular runners
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed May 27, 2018
1 parent 3a3b4e3 commit e4bff07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/jest-circus/runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Allow people to use `jest-circus/runner` as a runner.
const runner = require('./build/legacy_code_todo_rewrite/jest_adapter');
module.exports = runner;
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ const _addSnapshotData = (results: TestResult, snapshotState) => {
return results;
};

export default jestAdapter;
module.exports = jestAdapter;
4 changes: 1 addition & 3 deletions packages/jest-runner/src/run_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ async function runTestInternal(
/* $FlowFixMe */
const TestEnvironment = (require(testEnvironment): EnvironmentClass);
const testFramework = ((process.env.JEST_CIRCUS === '1'
? /* $FlowFixMe */
require('jest-circus/build/legacy_code_todo_rewrite/jest_adapter.js') // eslint-disable-line import/no-extraneous-dependencies
.default
? require('jest-circus/runner') // eslint-disable-line import/no-extraneous-dependencies
: /* $FlowFixMe */
require(config.testRunner)): TestFramework);
/* $FlowFixMe */
Expand Down

0 comments on commit e4bff07

Please sign in to comment.