Skip to content

[heft] Fix Heft-Jest-Plugin schema to match with configuration options #5097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft-jest-plugin",
"comment": "Extend heft-jest-plugin json schema to match HeftJestConfiguration",
"type": "patch"
}
],
"packageName": "@rushstack/heft-jest-plugin"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
"additionalProperties": false,

"properties": {
"configurationPath": {
"title": "Path to Jest configuration file",
"description": "If provided, this path will be used to load Jest configuration. Otherwise, Jest configuration will be loaded from \"jest.config.json\".",
"type": "string"
},
"disableCodeCoverage": {
"title": "Disable Code Coverage",
"description": "Disable any configured code coverage. If code coverage is not configured, this parameter has no effect.",
"type": "boolean"
},
"disableConfigurationModuleResolution": {
"title": "Disable Configuration Module Resolution",
"description": "If set to true, modules specified in the Jest configuration will be resolved using Jest default (rootDir-relative) resolution. Otherwise, modules will be resolved using Node module resolution.",
Expand All @@ -16,6 +26,51 @@
"title": "Enable management of the NODE_ENV variable",
"description": "If set to false, heft-jest-plugin will not set or unset the NODE_ENV variable. Otherwise, NODE_ENV will be set to `test` before execution and cleared after. If the NODE_ENV value is already set to a value that is not `test`, warning message appears.",
"type": "boolean"
},
"findRelatedTests": {
"title": "Find tests related to file",
"description": "Find and run the tests that cover the source file that is specified. This corresponds to the \"--findRelatedTests\" parameter in Jest\"s documentation. This parameter is not compatible with watch mode.",
"type": "string"
},
"maxWorkers": {
"title": "Maximum number of worker processes",
"description": "Use this parameter to control maximum number of worker processes tests are allowed to use. This parameter is similar to the parameter noted in the Jest documentation, and can either be an integer representing the number of workers to spawn when running tests, or can be a string representing a percentage of the available CPUs on the machine to utilize. Example values: \"3\", \"25%\"",
"type": "string"
},
"passWithNoTests": {
"title": "Pass with no tests",
"description": "If set to false, Jest will fail if no tests are found.",
"type": "boolean"
},
"silent": {
"title": "Disable console output",
"description": "Prevent tests from printing messages through the console. This corresponds to the \"--silent\" parameter in Jest\"s documentation.",
"type": "boolean"
},
"testNamePattern": {
"title": "Test Name Pattern",
"description": "Run only tests with a name that matches a regular expression. On Windows you will need to use \"/\" instead of \"\\\". This corresponds to the \"--testNamePattern\" parameter in Jest\"s documentation.",
"type": "string"
},
"testPathIgnorePatterns": {
"title": "Test Path Ignore Patterns",
"description": "Avoid running tests with a source file path that matches one ore more regular expressions. On Windows you will need to use \"/\" instead of \"\\\". This corresponds to the \"--testPathIgnorePatterns\" parameter in Jest\"s documentation.",
"type": "string"
},
"testPathPattern": {
"title": "Test Path Pattern",
"description": "Run only tests with a source file path that matches a regular expression. On Windows you will need to use \"/\" instead of \"\\\". This corresponds to the \"--testPathPattern\" parameter in Jest\"s documentation.",
"type": "string"
},
"testTimeout": {
"title": "Test Timeout",
"description": "Change the default timeout for tests; if a test doesn\"t complete within this many milliseconds, it will fail. Individual tests can override the default. If unspecified, the default is normally 5000 ms. This corresponds to the \"--testTimeout\" parameter in Jest\"s documentation.",
"type": "number"
},
"updateSnapshots": {
"title": "Update Snapshots",
"description": "Update Jest snapshots while running the tests. This corresponds to the \"--updateSnapshots\" parameter in Jest.",
"type": "boolean"
}
}
}