Skip to content

Commit

Permalink
Change of versioning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igmat committed Nov 9, 2016
1 parent f8e6f9b commit 57e8753
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 17 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Versioning
From version `"jest": "17.0.0"` we are using same MAJOR.MINOR as [`Jest`](/~https://github.com/facebook/jest).
For `"jest": "< 17.0.0"` use `"ts-jest": "0.1.13"`.

## Usage

To use this in your project, run:
Expand All @@ -28,7 +32,9 @@ Modify your project's `package.json` so that the `jest` section looks something
```json
{
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/ts-jest/preprocessor.js",
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
Expand All @@ -44,7 +50,9 @@ By default `jest` does not provide code coverage remapping for transpiled codes,
```json
{
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/ts-jest/preprocessor.js",
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testResultsProcessor": "<rootDir>/node_modules/ts-jest/coverageprocessor.js"
}
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-jest",
"version": "0.1.13",
"version": "17.0.0",
"main": "index.js",
"types": "./dist/index.d.ts",
"description": "A preprocessor with sourcemap support to help use Typescript with Jest",
Expand Down Expand Up @@ -36,7 +36,9 @@
},
"homepage": "/~https://github.com/kulshekhar/ts-jest#readme",
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/ts-jest/preprocessor.js",
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"mocksPattern": "__ts-jest-mocks__",
"testRegex": "/__tests__/.*\\.(spec)\\.(ts|js)$",
"coverageReporters": [
Expand All @@ -55,8 +57,6 @@
"dependencies": {
"glob-all": "^3.1.0",
"istanbul-lib-instrument": "^1.2.0",
"jest-config": "^16.0.2",
"jest-util": "^16.0.2",
"lodash.assign": "^4.2.0",
"lodash.includes": "^4.3.0",
"lodash.partition": "^4.6.0",
Expand All @@ -66,7 +66,7 @@
},
"peerDependencies": {
"typescript": "~2.0.6",
"jest": "~16.0.2"
"jest": "~17.0.0"
},
"devDependencies": {
"@types/es6-shim": "latest",
Expand All @@ -85,4 +85,4 @@
"rimraf": "latest",
"doctoc": "latest"
}
}
}
4 changes: 3 additions & 1 deletion tests/button/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"jest": {
"scriptPreprocessor": "../../preprocessor.js",
"transform": {
".(ts|tsx)": "../../preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
Expand Down
22 changes: 18 additions & 4 deletions tests/jestconfig-test/jest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
{
"rootDir": "./",
"scriptPreprocessor": "<rootDir>/node_modules/ts-jest/preprocessor.js",
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testResultsProcessor": "<rootDir>/node_modules/ts-jest/coverageprocessor.js",
"testRegex": "/specs/.*\\.spec\\.(ts|tsx|js)$",
"testEnvironment": "jsdom",
"coverageReporters": ["html", "json", "text"],
"coverageReporters": [
"html",
"json",
"text"
],
"coverageDirectory": "test_coverage_dir",
"moduleFileExtensions": ["ts", "tsx", "js", "json"],
"collectCoverageFrom": ["src/**/*.tsx", "src/**/*.ts"],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
],
"collectCoverageFrom": [
"src/**/*.tsx",
"src/**/*.ts"
],
"coverageThreshold": {
"global": {
"statements": 95
Expand Down
8 changes: 6 additions & 2 deletions tests/simple-async/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"jest": {
"rootDir": "./",
"scriptPreprocessor": "../../preprocessor.js",
"transform": {
".(ts|tsx)": "../../preprocessor.js"
},
"testResultsProcessor": "../../coverageprocessor.js",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"coverageReporters": ["json"],
"coverageReporters": [
"json"
],
"collectCoverageFrom": [
"Hello.ts",
"NullCoverage.js"
Expand Down
4 changes: 3 additions & 1 deletion tests/simple/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"jest": {
"scriptPreprocessor": "../../preprocessor.js",
"transform": {
".(ts|tsx)": "../../preprocessor.js"
},
"testResultsProcessor": "../../coverageprocessor.js",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"coverageReporters": ["json"],
Expand Down
4 changes: 3 additions & 1 deletion tests/watch-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"jest": {
"scriptPreprocessor": "../../preprocessor.js",
"transform": {
".(ts|tsx)": "../../preprocessor.js"
},
"testResultsProcessor": "../../coverageprocessor.js",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"coverageReporters": ["json"],
Expand Down

0 comments on commit 57e8753

Please sign in to comment.