Skip to content

Commit

Permalink
fix type ellision of jest-runtime imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmydief committed Mar 27, 2020
1 parent c73da2c commit fbcbce2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as path from 'path';
import type {Config} from '@jest/types';
import type {JestEnvironment} from '@jest/environment';
import type {TestResult} from '@jest/test-result';
import Runtime = require('jest-runtime');
import type {RuntimeType as Runtime} from 'jest-runtime';
import type {SnapshotStateType} from 'jest-snapshot';

const FRAMEWORK_INITIALIZER = require.resolve('./jestAdapterInit');
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jasmine2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {Config, Global} from '@jest/types';
import type {AssertionResult, TestResult} from '@jest/test-result';
import type {JestEnvironment} from '@jest/environment';
import type {SnapshotStateType} from 'jest-snapshot';
import Runtime = require('jest-runtime');
import type {RuntimeType as Runtime} from 'jest-runtime';

import {getCallsite} from '@jest/source-map';
import installEach from './each';
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ type CacheFS = {[path: string]: string};

namespace Runtime {
export type Context = JestContext;
// ditch this export when moving to esm - for now we need it for to avoid faulty type elision
export type RuntimeType = Runtime;
}

const testTimeoutSymbol = Symbol.for('TEST_TIMEOUT_SYMBOL');
Expand Down

0 comments on commit fbcbce2

Please sign in to comment.