Skip to content

Commit

Permalink
Merge branch 'master' into test-renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
kulshekhar authored Nov 8, 2017
2 parents ba9ba33 + c7e917d commit 2f291b0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Justin Bay <[email protected]>
Kulshekhar Kabra <[email protected]>
Kyle Roach <[email protected]>
Marshall Bowers <[email protected]>
Martijn The <[email protected]>
Matheus Gambati <[email protected]>
Maxim Samoilov <[email protected]>
Mohammad Rajabifard <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Modify your project's `package.json` so that the `jest` section looks something
{
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
Expand Down Expand Up @@ -225,7 +225,7 @@ In `package.json`, inside `jest` section, the `transform` should be like this:
```json
"transform": {
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest",
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
}
```

Expand All @@ -236,7 +236,7 @@ Fully completed jest section should look like this:
"preset": "react-native",
"transform": {
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest",
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
Expand Down Expand Up @@ -268,7 +268,7 @@ You'll also need to extend your `transform` regex with `html` extension:
{
"jest": {
"transform": {
"^.+\\.(tsx?|html)$": "ts-jest"
"^.+\\.(tsx?|html)$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/index');
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ts-jest",
"version": "21.2.0",
"main": "preprocessor.js",
"types": "./dist/preprocessor.d.ts",
"version": "21.2.1",
"main": "index.js",
"types": "./dist/index.d.ts",
"description": "A preprocessor with sourcemap support to help use Typescript with Jest",
"scripts": {
"build": "tsc -p .",
Expand Down Expand Up @@ -78,7 +78,7 @@
"yargs": "^10.0.3"
},
"peerDependencies": {
"jest": "^21.1.0 || ^21.3.0-alpha.1 || ^22.0.0-alpha.1",
"jest": "^21.1.0 || ^21.1.0-alpha.1 || ^22.0.0-alpha.1",
"typescript": "2.x"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/install.ts → src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as sourceMapSupport from 'source-map-support';
import { defaultRetrieveFileHandler } from './default-retrieve-file-handler';

export { transpileIfTypescript } from './transpile-if-ts';
export function install() {
const options: sourceMapSupport.Options = {};

Expand Down
2 changes: 0 additions & 2 deletions src/preprocessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { JestConfig, Path, TransformOptions } from './jest-types';
import { getPostProcessHook } from './postprocess';
import { getTSConfig, getTSJestConfig } from './utils';

export { install } from './install';

export function process(
src: string,
path: Path,
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/transpile-if-ts.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { transpileIfTypescript } from '../../src/transpile-if-ts';
import { transpileIfTypescript } from '../../src';

describe('transpileIfTypescript', () => {
it('should ignore anything non-TS', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/jestconfig-test/jest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"rootDir": "./",
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"mapCoverage": true,
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
Expand Down

0 comments on commit 2f291b0

Please sign in to comment.