Skip to content

Commit

Permalink
feat: index 'detects' appropriate runner
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed Mar 15, 2020
1 parent 68682a6 commit 1070d4a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions by-require.js
@@ -0,0 +1 @@
module.exports = require('./dist/by-require');
1 change: 1 addition & 0 deletions by-spawn.js
@@ -0,0 +1 @@
module.exports = require('./dist/by-spawn');
15 changes: 15 additions & 0 deletions lib/detect.ts
@@ -0,0 +1,15 @@
import { bySpawn } from './by-spawn';
import type { Config } from '@jest/types';
import type { JestEnvironment } from '@jest/environment';
import type Runtime from 'jest-runtime';
import type { TestResult } from '@jest/test-result';

export async function detect(
globalConfig: Config.GlobalConfig,
config: Config.ProjectConfig,
environment: JestEnvironment,
runtime: Runtime,
testPath: string,
): Promise<TestResult> {
return bySpawn(globalConfig, config, environment, runtime, testPath);
}
4 changes: 2 additions & 2 deletions lib/index.ts
@@ -1,3 +1,3 @@
import { bySpawn } from './by-spawn';
import { detect } from './detect';

export = bySpawn;
export = detect;

0 comments on commit 1070d4a

Please sign in to comment.