Skip to content

Commit

Permalink
chore: upgrade to stable typescript release (#8244)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Mar 30, 2019
1 parent 9c9555f commit 04e6a66
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 438 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@types/babel__template": "^7.0.0",
"@types/jest": "24.0.2",
"@types/node": "*",
"@typescript-eslint/eslint-plugin": "^1.4.2",
"@typescript-eslint/parser": "^1.4.2",
"@typescript-eslint/eslint-plugin": "^1.5.0",
"@typescript-eslint/parser": "^1.5.0",
"ansi-regex": "^4.0.0",
"ansi-styles": "^3.2.0",
"babel-eslint": "^9.0.0",
Expand Down Expand Up @@ -69,7 +69,7 @@
"slash": "^2.0.0",
"string-length": "^2.0.0",
"strip-ansi": "^5.0.0",
"typescript": "next",
"typescript": "^3.4.1",
"webpack": "^4.28.4"
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-plugin-jest-hoist/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export = () => {
}

const callee = expr.get('callee');
const expressionArguments = expr.get('arguments');
// TODO: avoid type casts - the types can be arrays (is it possible to ignore that without casting?)
const object = callee.get('object') as NodePath;
const property = callee.get('property') as NodePath;
Expand All @@ -169,7 +170,7 @@ export = () => {
FUNCTIONS[property.node.name] &&
(object.isIdentifier(JEST_GLOBAL) ||
(callee.isMemberExpression() && shouldHoistExpression(object))) &&
FUNCTIONS[property.node.name](expr.get('arguments'))
FUNCTIONS[property.node.name](expressionArguments)
);
};

Expand Down
3 changes: 1 addition & 2 deletions packages/expect/src/toThrowMatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ const formatStack = (thrown: Thrown | null) =>
thrown === null || !thrown.isError
? ''
: formatStackTrace(
// @ts-ignore
separateMessageFromStack(thrown.value.stack).stack,
separateMessageFromStack(thrown.value.stack!).stack,
{
rootDir: process.cwd(),
testMatch: [],
Expand Down
1 change: 0 additions & 1 deletion packages/jest-circus/src/__mocks__/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import os from 'os';
import path from 'path';
import crypto from 'crypto';
import {sync as spawnSync, ExecaReturns} from 'execa';
// @ts-ignore
import {skipSuiteOnWindows} from '@jest/test-utils';

const CIRCUS_PATH = require.resolve('../../build');
Expand Down
3 changes: 2 additions & 1 deletion packages/jest-circus/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{"path": "../jest-test-result"},
{"path": "../jest-types"},
{"path": "../jest-util"},
{"path": "../pretty-format"}
{"path": "../pretty-format"},
{"path": "../test-utils"}
]
}
128 changes: 0 additions & 128 deletions packages/jest-reporters/istanbul-lib-coverage.d.ts

This file was deleted.

Loading

0 comments on commit 04e6a66

Please sign in to comment.