Skip to content

Commit

Permalink
Fix type ellision of jest-runtime imports (#9717)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmydief authored Mar 27, 2020
1 parent 6f8bf80 commit db055c2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixes

- `[jest-circus]` Fix type ellision of jest-runtime imports ([#9717](https://github.com/facebook/jest/pull/9717))

### Chore & Maintenance

### Performance
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-circus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"jest-each": "^25.2.3",
"jest-matcher-utils": "^25.2.3",
"jest-message-util": "^25.2.3",
"jest-runtime": "^25.2.3",
"jest-snapshot": "^25.2.3",
"jest-util": "^25.2.3",
"pretty-format": "^25.2.3",
Expand All @@ -41,8 +42,7 @@
"@types/babel__traverse": "^7.0.4",
"@types/co": "^4.6.0",
"@types/stack-utils": "^1.0.1",
"execa": "^3.2.0",
"jest-runtime": "^25.2.3"
"execa": "^3.2.0"
},
"engines": {
"node": ">= 8.3"
Expand Down
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 db055c2

Please sign in to comment.