Update jest config

Summary:
We don't want to test again against the compiled JS output.
Also, we *do* want to fail if we break the config and don't
actually run any tests.

Reviewed By: nikoant

Differential Revision: D20068114

fbshipit-source-id: c46e5a25fcd155d160f717a9db8f088787913a28
This commit is contained in:
Pascal Hartig
2020-02-24 07:21:31 -08:00
committed by Facebook Github Bot
parent d949123831
commit 16a24d82c8
2 changed files with 7 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
{ {
"transform": { "transform": {
"^.+\\.(t|j)sx?$": "ts-jest" "^.+\\.tsx?$": "ts-jest"
}, },
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"testPathIgnorePatterns": [
"\/node_modules\/",
"\/lib\/"
],
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"] "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
} }

View File

@@ -26,7 +26,7 @@
"prepare": "yarn run build", "prepare": "yarn run build",
"prepublishOnly": "yarn test && yarn run lint", "prepublishOnly": "yarn test && yarn run lint",
"preversion": "yarn run lint", "preversion": "yarn run lint",
"test": "jest --config jestconfig.json --passWithNoTests", "test": "jest --config jestconfig.json",
"lint": "eslint -c ../../sonar/.eslintrc.js src/**/* --ext .js,.ts && tsc --noemit", "lint": "eslint -c ../../sonar/.eslintrc.js src/**/* --ext .js,.ts && tsc --noemit",
"fix": "eslint -c ../../sonar/.eslintrc.js src/**/* --fix --ext .js,.ts", "fix": "eslint -c ../../sonar/.eslintrc.js src/**/* --fix --ext .js,.ts",
"run": "yarn run build && node lib/cli.js" "run": "yarn run build && node lib/cli.js"
@@ -41,4 +41,4 @@
"dependencies": { "dependencies": {
"@types/node": "^12.12.12" "@types/node": "^12.12.12"
} }
} }