Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ module.exports = {
},
},
{
files: ['**/__typechecks__/**', '*.md'],
files: ['**/__typetests__/**', '*.md'],
rules: {
'jest/no-focused-tests': 'off',
'jest/no-identical-title': 'off',
Expand Down Expand Up @@ -303,7 +303,7 @@ module.exports = {
devDependencies: [
'**/__mocks__/**',
'**/__tests__/**',
'**/__typechecks__/**',
'**/__typetests__/**',
'**/?(*.)(spec|test).js?(x)',
'scripts/**',
'babel.config.js',
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
],
testPathIgnorePatterns: [
'/__arbitraries__/',
'/__typechecks__/',
'/__typetests__/',
'/node_modules/',
'/examples/',
'/e2e/.*/__tests__',
Expand Down
2 changes: 1 addition & 1 deletion jest.config.types.js → jest.config.tsd.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ module.exports = {
modulePathIgnorePatterns,
roots: ['<rootDir>/packages'],
runner: 'jest-runner-tsd',
testMatch: ['**/__typechecks__/**/*.ts'],
testMatch: ['**/__typetests__/**/*.ts'],
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@jest/globals": "workspace:*",
"@jest/test-utils": "workspace:*",
"@tsconfig/node10": "^1.0.8",
"@tsd/typescript": "~4.1.5",
Comment thread
mrazauskas marked this conversation as resolved.
"@types/babel__core": "^7.0.0",
"@types/babel__generator": "^7.0.0",
"@types/babel__template": "^7.0.0",
Expand Down Expand Up @@ -55,7 +56,7 @@
"jest-changed-files": "workspace:*",
"jest-junit": "^13.0.0",
"jest-mock": "workspace:*",
"jest-runner-tsd": "^1.1.0",
"jest-runner-tsd": "^2.0.0",
"jest-silent-reporter": "^0.5.0",
"jest-snapshot": "workspace:*",
"jest-snapshot-serializer-raw": "^1.1.0",
Expand Down Expand Up @@ -102,7 +103,7 @@
"lint:prettier": "prettier '**/*.{md,yml,yaml}' 'website/**/*.{css,js}' --write --ignore-path .gitignore",
"lint:prettier:ci": "prettier '**/*.{md,yml,yaml}' 'website/**/*.{css,js}' --check --ignore-path .gitignore",
"remove-examples": "node ./scripts/remove-examples.js",
"test-types": "yarn jest --config jest.config.types.js",
"test-types": "yarn jest --config jest.config.tsd.js",
"test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov",
"test-ci-partial": "yarn test-ci-partial:parallel -i",
"test-ci-partial:parallel": "yarn jest --color --config jest.config.ci.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-jest/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
// TODO: include `babel-preset-jest` if it's ever in TS even though we don't care about its types
"references": [
{"path": "../jest-transform"},
Expand Down
4 changes: 3 additions & 1 deletion packages/babel-plugin-jest-hoist/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
4 changes: 3 additions & 1 deletion packages/diff-sequences/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
2 changes: 1 addition & 1 deletion packages/expect/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/__mocks__/**
**/__tests__/**
__typechecks__
__typetests__
src
tsconfig.json
tsconfig.tsbuildinfo
9 changes: 9 additions & 0 deletions packages/expect/__typetests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"noUnusedLocals": false,
"noUnusedParameters": false,
"skipLibCheck": true
},
"include": ["./**/*"]
}
2 changes: 2 additions & 0 deletions packages/expect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-get-type"},
{"path": "../jest-matcher-utils"},
Expand Down
1 change: 1 addition & 0 deletions packages/jest-changed-files/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"references": [{"path": "../jest-types"}]
}
2 changes: 2 additions & 0 deletions packages/jest-circus/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"outDir": "build",
"rootDir": "src"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
"references": [
{"path": "../expect"},
{"path": "../jest-each"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-config"},
{"path": "../jest-core"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
// TODO: This is missing `babel-jest`, `jest-jasmine2`, `jest-circus` and
// jest-test-sequencer, but that is just `require.resolve`d, so no real use
// for their types
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-console/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-message-util"},
{"path": "../jest-types"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-changed-files"},
{"path": "../jest-config"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-create-cache-key-function/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [{"path": "../jest-types"}, {"path": "../jest-util"}]
}
2 changes: 2 additions & 0 deletions packages/jest-diff/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../diff-sequences"},
{"path": "../jest-get-type"},
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-docblock/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
2 changes: 2 additions & 0 deletions packages/jest-each/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-get-type"},
{"path": "../jest-types"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-environment-jsdom/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"outDir": "build",
"rootDir": "src"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
"references": [
{"path": "../jest-environment"},
{"path": "../jest-fake-timers"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-environment-node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"outDir": "build",
"rootDir": "src"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-environment"},
{"path": "../jest-fake-timers"},
Expand Down
1 change: 1 addition & 0 deletions packages/jest-environment/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"references": [
{"path": "../jest-fake-timers"},
{"path": "../jest-mock"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-fake-timers/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-message-util"},
{"path": "../jest-mock"},
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-get-type/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
2 changes: 2 additions & 0 deletions packages/jest-globals/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../expect"},
{"path": "../jest-environment"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-haste-map/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-regex-util"},
{"path": "../jest-serializer"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-jasmine2/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../expect"},
{"path": "../jest-each"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-leak-detector/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [{"path": "../jest-get-type"}, {"path": "../pretty-format"}]
}
2 changes: 2 additions & 0 deletions packages/jest-matcher-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-diff"},
{"path": "../jest-get-type"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-message-util/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [{"path": "../jest-types"}, {"path": "../pretty-format"}]
}
2 changes: 2 additions & 0 deletions packages/jest-mock/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [{"path": "../jest-types"}]
}
1 change: 1 addition & 0 deletions packages/jest-phabricator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"references": [
{
"path": "../jest-test-result"
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-regex-util/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
2 changes: 2 additions & 0 deletions packages/jest-repl/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-config"},
{"path": "../jest-console"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-reporters/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-console"},
{"path": "../jest-haste-map"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-resolve-dependencies/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-haste-map"},
{"path": "../jest-regex-util"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-resolve/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
"references": [
{"path": "../jest-haste-map"},
{"path": "../jest-types"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-runner/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../jest-console"},
{"path": "../jest-docblock"},
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-runtime/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
"references": [
{"path": "../jest-environment"},
{"path": "../jest-environment-node"},
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-serializer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"]
}
2 changes: 2 additions & 0 deletions packages/jest-snapshot/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"rootDir": "src",
"outDir": "build"
},
"include": ["./src/**/*"],
"exclude": ["./**/__mocks__/**/*", "./**/__tests__/**/*"],
"references": [
{"path": "../expect"},
{"path": "../jest-diff"},
Expand Down
Loading