Skip to content

Commit

Permalink
fix to inherit project's tsconfig for tests
Browse files Browse the repository at this point in the history
- previous fix in 1.3.1 introduced regression
- this configures ts-jest prepreocessor to use same TSC compiler options as the project, but makes one mod to address issue that was fixed in 1.3.1
- incorporates fix submitted in PR #10, but implemented in a different way
  • Loading branch information
andrewconnell committed Oct 14, 2019
1 parent 9c48e13 commit 7ff7726
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jest-preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"globals": {
"ts-jest": {
"tsConfig": "node_modules/@voitanos/jest-preset-spfx-react16/tsconfig.json"
"tsConfig": "node_modules/@voitanos/jest-preset-spfx-react16/tsconfig.ts-jest.json"
}
},
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@voitanos/jest-preset-spfx-react16",
"description": "Jest preset configuration for SharePoint Framework projects that leverage React v16 (SPFx >=1.7.0).",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"dependencies": {
"@types/enzyme-adapter-react-16": "1.0.5",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"baseUrl": ".",
"allowJs": true,
"types": ["node"],
"jsx": "react",
"esModuleInterop": true
"jsx": "react"
},
"include": [
"postinstall/*.ts"
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.ts-jest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"esModuleInterop": true
}
}

0 comments on commit 7ff7726

Please sign in to comment.