projen 0.70.2 → 0.70.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +108 -90
- package/docs/api/API.md +2 -0
- package/lib/.types-compat/ts3.9/lib/_resolve.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/auto-discover.d.ts +129 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-java.d.ts +53 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-py.d.ts +49 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-ts.d.ts +81 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-construct.d.ts +89 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-java.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-js.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-py.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps.d.ts +168 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-pytest-sample.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/cdk-config.d.ts +122 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/cdk-tasks.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/index.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/integration-test.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/internal.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/lambda-extension.d.ts +68 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/lambda-function.d.ts +171 -0
- package/lib/.types-compat/ts3.9/lib/build/build-workflow.d.ts +180 -0
- package/lib/.types-compat/ts3.9/lib/build/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/builtin-example.task.d.ts +0 -0
- package/lib/.types-compat/ts3.9/lib/cdk/auto-discover-base.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/cdk/construct-lib.d.ts +38 -0
- package/lib/.types-compat/ts3.9/lib/cdk/consts.d.ts +6 -0
- package/lib/.types-compat/ts3.9/lib/cdk/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/cdk/integration-test-base.d.ts +53 -0
- package/lib/.types-compat/ts3.9/lib/cdk/internal.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk/jsii-docgen.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/cdk/jsii-project.d.ts +153 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/auto-discover.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-app-py.d.ts +39 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-app-ts.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-construct.d.ts +71 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps-js.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps-py.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps.d.ts +144 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/index.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/integration-test.d.ts +13 -0
- package/lib/.types-compat/ts3.9/lib/cdktf/cdktf-construct.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/cdktf/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/circleci/circleci.d.ts +132 -0
- package/lib/.types-compat/ts3.9/lib/circleci/constant.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/circleci/index.d.ts +3 -0
- package/lib/.types-compat/ts3.9/lib/circleci/model.d.ts +260 -0
- package/lib/.types-compat/ts3.9/lib/cleanup.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/cli/cmds/new.d.ts +9 -0
- package/lib/.types-compat/ts3.9/lib/cli/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/cli/macros.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/cli/synth.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/cli/tasks.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/cli/util.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/clobber.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/common.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/component.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/dependencies.d.ts +160 -0
- package/lib/.types-compat/ts3.9/lib/dev-env.d.ts +80 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-network.d.ts +103 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-port.d.ts +44 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-render.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-service.d.ts +155 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-volume.d.ts +64 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose.d.ts +99 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/file.d.ts +119 -0
- package/lib/.types-compat/ts3.9/lib/gitattributes.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/github/actions-provider.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/github/auto-approve.d.ts +44 -0
- package/lib/.types-compat/ts3.9/lib/github/auto-merge.d.ts +41 -0
- package/lib/.types-compat/ts3.9/lib/github/constants.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/github/dependabot.d.ts +247 -0
- package/lib/.types-compat/ts3.9/lib/github/github-credentials.d.ts +58 -0
- package/lib/.types-compat/ts3.9/lib/github/github-project.d.ts +177 -0
- package/lib/.types-compat/ts3.9/lib/github/github.d.ts +110 -0
- package/lib/.types-compat/ts3.9/lib/github/index.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/github/mergify.d.ts +81 -0
- package/lib/.types-compat/ts3.9/lib/github/pr-template.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/github/pull-request-lint.d.ts +48 -0
- package/lib/.types-compat/ts3.9/lib/github/stale-util.d.ts +8 -0
- package/lib/.types-compat/ts3.9/lib/github/stale.d.ts +85 -0
- package/lib/.types-compat/ts3.9/lib/github/task-workflow.d.ts +119 -0
- package/lib/.types-compat/ts3.9/lib/github/util.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/github/workflow-actions.d.ts +78 -0
- package/lib/.types-compat/ts3.9/lib/github/workflows-model.d.ts +1031 -0
- package/lib/.types-compat/ts3.9/lib/github/workflows.d.ts +108 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/configuration-model.d.ts +536 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/configuration.d.ts +170 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/gitlab-configuration.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/nested-configuration.d.ts +11 -0
- package/lib/.types-compat/ts3.9/lib/gitpod.d.ts +301 -0
- package/lib/.types-compat/ts3.9/lib/ignore-file.d.ts +59 -0
- package/lib/.types-compat/ts3.9/lib/index.d.ts +51 -0
- package/lib/.types-compat/ts3.9/lib/ini.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/inventory.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/java/index.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/java/java-project.d.ts +141 -0
- package/lib/.types-compat/ts3.9/lib/java/junit.d.ts +29 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-compile.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-packaging.d.ts +34 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-sample.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/java/pom.d.ts +214 -0
- package/lib/.types-compat/ts3.9/lib/java/projenrc.d.ts +59 -0
- package/lib/.types-compat/ts3.9/lib/javascript/bundler.d.ts +174 -0
- package/lib/.types-compat/ts3.9/lib/javascript/eslint.d.ts +175 -0
- package/lib/.types-compat/ts3.9/lib/javascript/index.d.ts +10 -0
- package/lib/.types-compat/ts3.9/lib/javascript/jest.d.ts +599 -0
- package/lib/.types-compat/ts3.9/lib/javascript/node-package.d.ts +605 -0
- package/lib/.types-compat/ts3.9/lib/javascript/node-project.d.ts +464 -0
- package/lib/.types-compat/ts3.9/lib/javascript/npm-config.d.ts +40 -0
- package/lib/.types-compat/ts3.9/lib/javascript/prettier.d.ts +358 -0
- package/lib/.types-compat/ts3.9/lib/javascript/projenrc.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/javascript/render-options.d.ts +88 -0
- package/lib/.types-compat/ts3.9/lib/javascript/typescript-config.d.ts +403 -0
- package/lib/.types-compat/ts3.9/lib/javascript/upgrade-dependencies.d.ts +188 -0
- package/lib/.types-compat/ts3.9/lib/javascript/util.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/json-patch.d.ts +75 -0
- package/lib/.types-compat/ts3.9/lib/json.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/license.d.ts +31 -0
- package/lib/.types-compat/ts3.9/lib/logger.d.ts +73 -0
- package/lib/.types-compat/ts3.9/lib/logging.d.ts +8 -0
- package/lib/.types-compat/ts3.9/lib/makefile.d.ts +77 -0
- package/lib/.types-compat/ts3.9/lib/object-file.d.ts +155 -0
- package/lib/.types-compat/ts3.9/lib/option-hints.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/project-build.d.ts +41 -0
- package/lib/.types-compat/ts3.9/lib/project.d.ts +374 -0
- package/lib/.types-compat/ts3.9/lib/projects.d.ts +63 -0
- package/lib/.types-compat/ts3.9/lib/projenrc-json.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/projenrc.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/python/index.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/python/pip.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/python/poetry.d.ts +177 -0
- package/lib/.types-compat/ts3.9/lib/python/projenrc.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/python/pytest-sample.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/python/pytest.d.ts +24 -0
- package/lib/.types-compat/ts3.9/lib/python/python-deps.d.ts +30 -0
- package/lib/.types-compat/ts3.9/lib/python/python-env.d.ts +6 -0
- package/lib/.types-compat/ts3.9/lib/python/python-packaging.d.ts +62 -0
- package/lib/.types-compat/ts3.9/lib/python/python-project.d.ts +190 -0
- package/lib/.types-compat/ts3.9/lib/python/python-sample.d.ts +17 -0
- package/lib/.types-compat/ts3.9/lib/python/requirements-file.d.ts +29 -0
- package/lib/.types-compat/ts3.9/lib/python/setuppy.d.ts +70 -0
- package/lib/.types-compat/ts3.9/lib/python/setuptools.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/python/venv.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/readme.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/release/bump-version.d.ts +72 -0
- package/lib/.types-compat/ts3.9/lib/release/bump-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/index.d.ts +3 -0
- package/lib/.types-compat/ts3.9/lib/release/publisher.d.ts +533 -0
- package/lib/.types-compat/ts3.9/lib/release/release-trigger.d.ts +97 -0
- package/lib/.types-compat/ts3.9/lib/release/release.d.ts +338 -0
- package/lib/.types-compat/ts3.9/lib/release/reset-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/tag-version.d.ts +31 -0
- package/lib/.types-compat/ts3.9/lib/release/tag-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/update-changelog.d.ts +36 -0
- package/lib/.types-compat/ts3.9/lib/release/update-changelog.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/renovatebot.d.ts +99 -0
- package/lib/.types-compat/ts3.9/lib/run-projenrc-json.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/sample-file.d.ts +88 -0
- package/lib/.types-compat/ts3.9/lib/semver.d.ts +34 -0
- package/lib/.types-compat/ts3.9/lib/smithy/smithy-build.d.ts +156 -0
- package/lib/.types-compat/ts3.9/lib/source-code.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/task-model.d.ts +130 -0
- package/lib/.types-compat/ts3.9/lib/task-runtime.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/task.d.ts +129 -0
- package/lib/.types-compat/ts3.9/lib/tasks.d.ts +51 -0
- package/lib/.types-compat/ts3.9/lib/testing.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/textfile.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/toml.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/typescript/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/typescript/projenrc-ts.d.ts +43 -0
- package/lib/.types-compat/ts3.9/lib/typescript/projenrc.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/typescript/typescript-typedoc.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/typescript/typescript.d.ts +163 -0
- package/lib/.types-compat/ts3.9/lib/util/semver.d.ts +43 -0
- package/lib/.types-compat/ts3.9/lib/util/synth.d.ts +42 -0
- package/lib/.types-compat/ts3.9/lib/util.d.ts +131 -0
- package/lib/.types-compat/ts3.9/lib/version.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/vscode/devcontainer.d.ts +86 -0
- package/lib/.types-compat/ts3.9/lib/vscode/extensions.d.ts +36 -0
- package/lib/.types-compat/ts3.9/lib/vscode/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/vscode/launch-config.d.ts +90 -0
- package/lib/.types-compat/ts3.9/lib/vscode/settings.d.ts +24 -0
- package/lib/.types-compat/ts3.9/lib/vscode/vscode.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/web/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/web/next.d.ts +100 -0
- package/lib/.types-compat/ts3.9/lib/web/postcss.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/web/react.d.ts +105 -0
- package/lib/.types-compat/ts3.9/lib/web/tailwind.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/xmlfile.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/yaml.d.ts +25 -0
- package/lib/awscdk/auto-discover.js +5 -5
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +8 -5
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/cli/index.js +2 -18
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +1 -1
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.d.ts +7 -0
- package/lib/release/publisher.js +9 -2
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +3 -2
- package/lib/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +3 -3
- package/lib/util.d.ts +19 -0
- package/lib/util.js +33 -2
- package/lib/version.js +1 -1
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
import { Component } from "../component";
|
|
2
|
+
import { NodeProject } from "../javascript";
|
|
3
|
+
import { JsonFile } from "../json";
|
|
4
|
+
import { Project } from "../project";
|
|
5
|
+
export interface JestConfigOptions {
|
|
6
|
+
/**
|
|
7
|
+
* This option tells Jest that all imported modules in your tests should be mocked automatically.
|
|
8
|
+
* All modules used in your tests will have a replacement implementation, keeping the API surface
|
|
9
|
+
* @default - false
|
|
10
|
+
*/
|
|
11
|
+
readonly automock?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* By default, Jest runs all tests and produces all errors into the console upon completion.
|
|
14
|
+
* The bail config option can be used here to have Jest stop running tests after n failures.
|
|
15
|
+
* Setting bail to true is the same as setting bail to 1.
|
|
16
|
+
* @default - 0
|
|
17
|
+
*/
|
|
18
|
+
readonly bail?: boolean | number;
|
|
19
|
+
/**
|
|
20
|
+
* The directory where Jest should store its cached dependency information
|
|
21
|
+
* @default - "/tmp/<path>"
|
|
22
|
+
*/
|
|
23
|
+
readonly cacheDirectory?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Automatically clear mock calls and instances before every test.
|
|
26
|
+
* Equivalent to calling jest.clearAllMocks() before each test.
|
|
27
|
+
* This does not remove any mock implementation that may have been provided
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
readonly clearMocks?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates whether the coverage information should be collected while executing the test.
|
|
33
|
+
* Because this retrofits all executed files with coverage collection statements,
|
|
34
|
+
* it may significantly slow down your tests
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
readonly collectCoverage?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* An array of glob patterns indicating a set of files for which coverage information should be collected.
|
|
40
|
+
* @default - undefined
|
|
41
|
+
*/
|
|
42
|
+
readonly collectCoverageFrom?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* The directory where Jest should output its coverage files.
|
|
45
|
+
* @default "coverage"
|
|
46
|
+
*/
|
|
47
|
+
readonly coverageDirectory?: string;
|
|
48
|
+
/**
|
|
49
|
+
* An array of regexp pattern strings that are matched against all file paths before executing the test.
|
|
50
|
+
* If the file path matches any of the patterns, coverage information will be skipped
|
|
51
|
+
* @default "/node_modules/"
|
|
52
|
+
*/
|
|
53
|
+
readonly coveragePathIgnorePatterns?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Indicates which provider should be used to instrument code for coverage.
|
|
56
|
+
* Allowed values are babel (default) or v8
|
|
57
|
+
* @default - "babel"
|
|
58
|
+
*/
|
|
59
|
+
readonly coverageProvider?: "babel" | "v8";
|
|
60
|
+
/**
|
|
61
|
+
* A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter can be used
|
|
62
|
+
* @default - ["json", "lcov", "text", "clover", "cobertura"]
|
|
63
|
+
*/
|
|
64
|
+
readonly coverageReporters?: string[];
|
|
65
|
+
/**
|
|
66
|
+
* Specify the global coverage thresholds. This will be used to configure minimum threshold enforcement
|
|
67
|
+
* for coverage results. Thresholds can be specified as global, as a glob, and as a directory or file path.
|
|
68
|
+
* If thresholds aren't met, jest will fail.
|
|
69
|
+
* @default - undefined
|
|
70
|
+
*/
|
|
71
|
+
readonly coverageThreshold?: CoverageThreshold;
|
|
72
|
+
/**
|
|
73
|
+
* This option allows the use of a custom dependency extractor.
|
|
74
|
+
* It must be a node module that exports an object with an extract function
|
|
75
|
+
* @default - undefined
|
|
76
|
+
*/
|
|
77
|
+
readonly dependencyExtractor?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Allows for a label to be printed alongside a test while it is running.
|
|
80
|
+
* @default - undefined
|
|
81
|
+
*/
|
|
82
|
+
readonly displayName?: string | any;
|
|
83
|
+
/**
|
|
84
|
+
* Make calling deprecated APIs throw helpful error messages. Useful for easing the upgrade process.
|
|
85
|
+
* @default - false
|
|
86
|
+
*/
|
|
87
|
+
readonly errorOnDeprecated?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Test files run inside a vm, which slows calls to global context properties (e.g. Math).
|
|
90
|
+
* With this option you can specify extra properties to be defined inside the vm for faster lookups.
|
|
91
|
+
* @default - undefined
|
|
92
|
+
*/
|
|
93
|
+
readonly extraGlobals?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Test files are normally ignored from collecting code coverage.
|
|
96
|
+
* With this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
|
|
97
|
+
* @default - ['']
|
|
98
|
+
*/
|
|
99
|
+
readonly forceCoverageMatch?: string[];
|
|
100
|
+
/**
|
|
101
|
+
* A set of global variables that need to be available in all test environments.
|
|
102
|
+
* @default - {}
|
|
103
|
+
*/
|
|
104
|
+
readonly globals?: any;
|
|
105
|
+
/**
|
|
106
|
+
* This option allows the use of a custom global setup module which exports an async function that is
|
|
107
|
+
* triggered once before all test suites. This function gets Jest's globalConfig object as a parameter.
|
|
108
|
+
* @default - undefined
|
|
109
|
+
*/
|
|
110
|
+
readonly globalSetup?: string;
|
|
111
|
+
/**
|
|
112
|
+
* This option allows the use of a custom global teardown module which exports an async function that is
|
|
113
|
+
* triggered once after all test suites. This function gets Jest's globalConfig object as a parameter.
|
|
114
|
+
* @default - undefined
|
|
115
|
+
*/
|
|
116
|
+
readonly globalTeardown?: string;
|
|
117
|
+
/**
|
|
118
|
+
* This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.
|
|
119
|
+
* @default - {}
|
|
120
|
+
*/
|
|
121
|
+
readonly haste?: HasteConfig;
|
|
122
|
+
/**
|
|
123
|
+
* Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment.
|
|
124
|
+
* If you set this to false, you should import from @jest/globals
|
|
125
|
+
* @default - true
|
|
126
|
+
*/
|
|
127
|
+
readonly injectGlobals?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* A number limiting the number of tests that are allowed to run at the same time when using test.concurrent.
|
|
130
|
+
* Any test above this limit will be queued and executed once a slot is released.
|
|
131
|
+
* @default - 5
|
|
132
|
+
*/
|
|
133
|
+
readonly maxConcurrency?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Specifies the maximum number of workers the worker-pool will spawn for running tests. In single run mode,
|
|
136
|
+
* this defaults to the number of the cores available on your machine minus one for the main thread
|
|
137
|
+
* In watch mode, this defaults to half of the available cores on your machine.
|
|
138
|
+
* For environments with variable CPUs available, you can use percentage based configuration: "maxWorkers": "50%"
|
|
139
|
+
* @default - the number of the cores available on your machine minus one for the main thread
|
|
140
|
+
*/
|
|
141
|
+
readonly maxWorkers?: number | string;
|
|
142
|
+
/**
|
|
143
|
+
* An array of directory names to be searched recursively up from the requiring module's location.
|
|
144
|
+
* Setting this option will override the default, if you wish to still search node_modules for packages
|
|
145
|
+
* include it along with any other options: ["node_modules", "bower_components"]
|
|
146
|
+
* @default - ["node_modules"]
|
|
147
|
+
*/
|
|
148
|
+
readonly moduleDirectories?: string[];
|
|
149
|
+
/**
|
|
150
|
+
* An array of file extensions your modules use. If you require modules without specifying a file extension,
|
|
151
|
+
* these are the extensions Jest will look for, in left-to-right order.
|
|
152
|
+
* @default - ["js", "json", "jsx", "ts", "tsx", "node"]
|
|
153
|
+
*/
|
|
154
|
+
readonly moduleFileExtensions?: string[];
|
|
155
|
+
/**
|
|
156
|
+
* A map from regular expressions to module names or to arrays of module names that allow to stub out
|
|
157
|
+
* resources, like images or styles with a single module.
|
|
158
|
+
* @default - null
|
|
159
|
+
*/
|
|
160
|
+
readonly moduleNameMapper?: {
|
|
161
|
+
[key: string]: string | string[];
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* An array of regexp pattern strings that are matched against all module paths before those paths are
|
|
165
|
+
* to be considered 'visible' to the module loader. If a given module's path matches any of the patterns,
|
|
166
|
+
* it will not be require()-able in the test environment.
|
|
167
|
+
* @default - []
|
|
168
|
+
*/
|
|
169
|
+
readonly modulePathIgnorePatterns?: string[];
|
|
170
|
+
/**
|
|
171
|
+
* An alternative API to setting the NODE_PATH env variable, modulePaths is an array of absolute paths
|
|
172
|
+
* to additional locations to search when resolving modules. Use the <rootDir> string token to include
|
|
173
|
+
* the path to your project's root directory. Example: ["<rootDir>/app/"].
|
|
174
|
+
* @default - []
|
|
175
|
+
*/
|
|
176
|
+
readonly modulePaths?: string[];
|
|
177
|
+
/**
|
|
178
|
+
* Activates notifications for test results.
|
|
179
|
+
* @default - false
|
|
180
|
+
*/
|
|
181
|
+
readonly notify?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Specifies notification mode. Requires notify: true
|
|
184
|
+
* @default - failure-change
|
|
185
|
+
*/
|
|
186
|
+
readonly notifyMode?: "always" | "failure" | "success" | "change" | "success-change" | "failure-change";
|
|
187
|
+
/**
|
|
188
|
+
* A preset that is used as a base for Jest's configuration. A preset should point to an npm module
|
|
189
|
+
* that has a jest-preset.json or jest-preset.js file at the root.
|
|
190
|
+
* @default - undefined
|
|
191
|
+
*/
|
|
192
|
+
readonly preset?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Sets the path to the prettier node module used to update inline snapshots.
|
|
195
|
+
* @default - "prettier"
|
|
196
|
+
*/
|
|
197
|
+
readonly prettierPath?: string;
|
|
198
|
+
/**
|
|
199
|
+
* When the projects configuration is provided with an array of paths or glob patterns, Jest will
|
|
200
|
+
* run tests in all of the specified projects at the same time. This is great for monorepos or
|
|
201
|
+
* when working on multiple projects at the same time.
|
|
202
|
+
* @default - undefined
|
|
203
|
+
*/
|
|
204
|
+
readonly projects?: Array<string | {
|
|
205
|
+
[key: string]: any;
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Use this configuration option to add custom reporters to Jest. A custom reporter is a class
|
|
209
|
+
* that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be
|
|
210
|
+
* called when any of those events occurs.
|
|
211
|
+
* @default - undefined
|
|
212
|
+
*/
|
|
213
|
+
readonly reporters?: JestReporter[];
|
|
214
|
+
/**
|
|
215
|
+
* Automatically reset mock state before every test. Equivalent to calling jest.resetAllMocks()
|
|
216
|
+
* before each test. This will lead to any mocks having their fake implementations removed but
|
|
217
|
+
* does not restore their initial implementation.
|
|
218
|
+
* @default - false
|
|
219
|
+
*/
|
|
220
|
+
readonly resetMocks?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* By default, each test file gets its own independent module registry. Enabling resetModules
|
|
223
|
+
* goes a step further and resets the module registry before running each individual test.
|
|
224
|
+
* @default - false
|
|
225
|
+
*/
|
|
226
|
+
readonly resetModules?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* This option allows the use of a custom resolver.
|
|
229
|
+
* https://jestjs.io/docs/en/configuration#resolver-string
|
|
230
|
+
* @default - undefined
|
|
231
|
+
*/
|
|
232
|
+
readonly resolver?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Automatically restore mock state before every test. Equivalent to calling jest.restoreAllMocks()
|
|
235
|
+
* before each test. This will lead to any mocks having their fake implementations removed and
|
|
236
|
+
* restores their initial implementation.
|
|
237
|
+
* @default - false
|
|
238
|
+
*/
|
|
239
|
+
readonly restoreMocks?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* The root directory that Jest should scan for tests and modules within. If you put your Jest
|
|
242
|
+
* config inside your package.json and want the root directory to be the root of your repo, the
|
|
243
|
+
* value for this config param will default to the directory of the package.json.
|
|
244
|
+
* @default - directory of the package.json
|
|
245
|
+
*/
|
|
246
|
+
readonly rootDir?: string;
|
|
247
|
+
/**
|
|
248
|
+
* A list of paths to directories that Jest should use to search for files in.
|
|
249
|
+
* @default - ["<rootDir>"]
|
|
250
|
+
*/
|
|
251
|
+
readonly roots?: string[];
|
|
252
|
+
/**
|
|
253
|
+
* This option allows you to use a custom runner instead of Jest's default test runner.
|
|
254
|
+
* @default - "jest-runner"
|
|
255
|
+
*/
|
|
256
|
+
readonly runner?: string;
|
|
257
|
+
/**
|
|
258
|
+
* A list of paths to modules that run some code to configure or set up the testing environment.
|
|
259
|
+
* Each setupFile will be run once per test file. Since every test runs in its own environment,
|
|
260
|
+
* these scripts will be executed in the testing environment immediately before executing the
|
|
261
|
+
* test code itself.
|
|
262
|
+
* @default - []
|
|
263
|
+
*/
|
|
264
|
+
readonly setupFiles?: string[];
|
|
265
|
+
/**
|
|
266
|
+
* A list of paths to modules that run some code to configure or set up the testing framework
|
|
267
|
+
* before each test file in the suite is executed. Since setupFiles executes before the test
|
|
268
|
+
* framework is installed in the environment, this script file presents you the opportunity of
|
|
269
|
+
* running some code immediately after the test framework has been installed in the environment.
|
|
270
|
+
* @default - []
|
|
271
|
+
*/
|
|
272
|
+
readonly setupFilesAfterEnv?: string[];
|
|
273
|
+
/**
|
|
274
|
+
* The number of seconds after which a test is considered as slow and reported as such in the results.
|
|
275
|
+
* @default - 5
|
|
276
|
+
*/
|
|
277
|
+
readonly slowTestThreshold?: number;
|
|
278
|
+
/**
|
|
279
|
+
* The path to a module that can resolve test<->snapshot path. This config option lets you customize
|
|
280
|
+
* where Jest stores snapshot files on disk.
|
|
281
|
+
* @default - undefined
|
|
282
|
+
*/
|
|
283
|
+
readonly snapshotResolver?: string;
|
|
284
|
+
/**
|
|
285
|
+
* A list of paths to snapshot serializer modules Jest should use for snapshot testing.
|
|
286
|
+
* @default = []
|
|
287
|
+
*/
|
|
288
|
+
readonly snapshotSerializers?: string[];
|
|
289
|
+
/**
|
|
290
|
+
* The test environment that will be used for testing. The default environment in Jest is a
|
|
291
|
+
* browser-like environment through jsdom. If you are building a node service, you can use the node
|
|
292
|
+
* option to use a node-like environment instead.
|
|
293
|
+
* @default - "jsdom"
|
|
294
|
+
*/
|
|
295
|
+
readonly testEnvironment?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Test environment options that will be passed to the testEnvironment.
|
|
298
|
+
* The relevant options depend on the environment.
|
|
299
|
+
* @default - {}
|
|
300
|
+
*/
|
|
301
|
+
readonly testEnvironmentOptions?: any;
|
|
302
|
+
/**
|
|
303
|
+
* The exit code Jest returns on test failure.
|
|
304
|
+
* @default - 1
|
|
305
|
+
*/
|
|
306
|
+
readonly testFailureExitCode?: number;
|
|
307
|
+
/**
|
|
308
|
+
* The glob patterns Jest uses to detect test files. By default it looks for .js, .jsx, .ts and .tsx
|
|
309
|
+
* files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
|
|
310
|
+
* (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
|
|
311
|
+
* @default ['**\/__tests__/**\/*.[jt]s?(x)', '**\/?(*.)+(spec|test).[tj]s?(x)']
|
|
312
|
+
*/
|
|
313
|
+
readonly testMatch?: string[];
|
|
314
|
+
/**
|
|
315
|
+
* An array of regexp pattern strings that are matched against all test paths before executing the test.
|
|
316
|
+
* If the test path matches any of the patterns, it will be skipped.
|
|
317
|
+
* @default - ["/node_modules/"]
|
|
318
|
+
*/
|
|
319
|
+
readonly testPathIgnorePatterns?: string[];
|
|
320
|
+
/**
|
|
321
|
+
* The pattern or patterns Jest uses to detect test files. By default it looks for .js, .jsx, .ts and .tsx
|
|
322
|
+
* files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
|
|
323
|
+
* (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
|
|
324
|
+
* @default - (/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$
|
|
325
|
+
*/
|
|
326
|
+
readonly testRegex?: string | string[];
|
|
327
|
+
/**
|
|
328
|
+
* This option allows the use of a custom results processor.
|
|
329
|
+
* @default - undefined
|
|
330
|
+
*/
|
|
331
|
+
readonly testResultsProcessor?: string;
|
|
332
|
+
/**
|
|
333
|
+
* This option allows the use of a custom test runner. The default is jasmine2. A custom test runner
|
|
334
|
+
* can be provided by specifying a path to a test runner implementation.
|
|
335
|
+
* @default - "jasmine2"
|
|
336
|
+
*/
|
|
337
|
+
readonly testRunner?: string;
|
|
338
|
+
/**
|
|
339
|
+
* This option allows you to use a custom sequencer instead of Jest's default.
|
|
340
|
+
* Sort may optionally return a Promise.
|
|
341
|
+
* @default - "@jest/test-sequencer"
|
|
342
|
+
*/
|
|
343
|
+
readonly testSequencer?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Default timeout of a test in milliseconds.
|
|
346
|
+
* @default - 5000
|
|
347
|
+
*/
|
|
348
|
+
readonly testTimeout?: number;
|
|
349
|
+
/**
|
|
350
|
+
* This option sets the URL for the jsdom environment. It is reflected in properties such as location.href.
|
|
351
|
+
* @default - "http://localhost"
|
|
352
|
+
*/
|
|
353
|
+
readonly testURL?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.
|
|
356
|
+
* Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
|
|
357
|
+
* @default - "real"
|
|
358
|
+
*/
|
|
359
|
+
readonly timers?: string;
|
|
360
|
+
/**
|
|
361
|
+
* A map from regular expressions to paths to transformers. A transformer is a module that provides a
|
|
362
|
+
* synchronous function for transforming source files.
|
|
363
|
+
* @default - {"\\.[jt]sx?$": "babel-jest"}
|
|
364
|
+
*/
|
|
365
|
+
readonly transform?: {
|
|
366
|
+
[key: string]: Transform;
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* An array of regexp pattern strings that are matched against all source file paths before transformation.
|
|
370
|
+
* If the test path matches any of the patterns, it will not be transformed.
|
|
371
|
+
* @default - ["/node_modules/", "\\.pnp\\.[^\\\/]+$"]
|
|
372
|
+
*/
|
|
373
|
+
readonly transformIgnorePatterns?: string[];
|
|
374
|
+
/**
|
|
375
|
+
* An array of regexp pattern strings that are matched against all modules before the module loader will
|
|
376
|
+
* automatically return a mock for them. If a module's path matches any of the patterns in this list, it
|
|
377
|
+
* will not be automatically mocked by the module loader.
|
|
378
|
+
* @default - []
|
|
379
|
+
*/
|
|
380
|
+
readonly unmockedModulePathPatterns?: string[];
|
|
381
|
+
/**
|
|
382
|
+
* Indicates whether each individual test should be reported during the run. All errors will also
|
|
383
|
+
* still be shown on the bottom after execution. Note that if there is only one test file being run
|
|
384
|
+
* it will default to true.
|
|
385
|
+
* @default - false
|
|
386
|
+
*/
|
|
387
|
+
readonly verbose?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* An array of RegExp patterns that are matched against all source file paths before re-running tests
|
|
390
|
+
* in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger
|
|
391
|
+
* a re-run of tests.
|
|
392
|
+
* @default - []
|
|
393
|
+
*/
|
|
394
|
+
readonly watchPathIgnorePatterns?: string[];
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @default -
|
|
398
|
+
*/
|
|
399
|
+
readonly watchPlugins?: WatchPlugin[];
|
|
400
|
+
/**
|
|
401
|
+
* Whether to use watchman for file crawling.
|
|
402
|
+
* @default - true
|
|
403
|
+
*/
|
|
404
|
+
readonly watchman?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Escape hatch to allow any value
|
|
407
|
+
*/
|
|
408
|
+
readonly additionalOptions?: {
|
|
409
|
+
[name: string]: any;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Escape hatch to allow any value (JS/TS only)
|
|
413
|
+
*
|
|
414
|
+
* @deprecated use `additionalOptions` instead.
|
|
415
|
+
*
|
|
416
|
+
* @jsii ignore
|
|
417
|
+
*/
|
|
418
|
+
readonly [name: string]: any;
|
|
419
|
+
}
|
|
420
|
+
export declare class Transform {
|
|
421
|
+
private readonly name;
|
|
422
|
+
private readonly options?;
|
|
423
|
+
constructor(name: string, options?: any);
|
|
424
|
+
/**
|
|
425
|
+
* @jsii ignore
|
|
426
|
+
* @internal
|
|
427
|
+
*/
|
|
428
|
+
toJSON(): string | any[];
|
|
429
|
+
}
|
|
430
|
+
export declare class WatchPlugin {
|
|
431
|
+
private readonly name;
|
|
432
|
+
private readonly options?;
|
|
433
|
+
constructor(name: string, options?: any);
|
|
434
|
+
/**
|
|
435
|
+
* @jsii ignore
|
|
436
|
+
* @internal
|
|
437
|
+
*/
|
|
438
|
+
toJSON(): string | any[];
|
|
439
|
+
}
|
|
440
|
+
export interface JestOptions {
|
|
441
|
+
/**
|
|
442
|
+
* Collect coverage. Deprecated
|
|
443
|
+
* @default true
|
|
444
|
+
* @deprecated use jestConfig.collectCoverage
|
|
445
|
+
*/
|
|
446
|
+
readonly coverage?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Include the `text` coverage reporter, which means that coverage summary is printed
|
|
449
|
+
* at the end of the jest execution.
|
|
450
|
+
*
|
|
451
|
+
* @default true
|
|
452
|
+
*/
|
|
453
|
+
readonly coverageText?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Defines `testPathIgnorePatterns` and `coveragePathIgnorePatterns`
|
|
456
|
+
* @default ["/node_modules/"]
|
|
457
|
+
* @deprecated use jestConfig.coveragePathIgnorePatterns or jestConfig.testPathIgnorePatterns respectively
|
|
458
|
+
*/
|
|
459
|
+
readonly ignorePatterns?: string[];
|
|
460
|
+
/**
|
|
461
|
+
* Result processing with jest-junit.
|
|
462
|
+
*
|
|
463
|
+
* Output directory is `test-reports/`.
|
|
464
|
+
*
|
|
465
|
+
* @default true
|
|
466
|
+
*/
|
|
467
|
+
readonly junitReporting?: boolean;
|
|
468
|
+
/**
|
|
469
|
+
* Preserve the default Jest reporter when additional reporters are added.
|
|
470
|
+
*
|
|
471
|
+
* @default true
|
|
472
|
+
*/
|
|
473
|
+
readonly preserveDefaultReporters?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Whether to update snapshots in task "test" (which is executed in task "build" and build workflows),
|
|
476
|
+
* or create a separate task "test:update" for updating snapshots.
|
|
477
|
+
*
|
|
478
|
+
* @default - ALWAYS
|
|
479
|
+
*/
|
|
480
|
+
readonly updateSnapshot?: UpdateSnapshot;
|
|
481
|
+
/**
|
|
482
|
+
* The version of jest to use.
|
|
483
|
+
*
|
|
484
|
+
* Note that same version is used as version of `@types/jest` and `ts-jest` (if Typescript in use), so given version should work also for those.
|
|
485
|
+
*
|
|
486
|
+
* @default - installs the latest jest version
|
|
487
|
+
*/
|
|
488
|
+
readonly jestVersion?: string;
|
|
489
|
+
/**
|
|
490
|
+
* Path to JSON config file for Jest
|
|
491
|
+
*
|
|
492
|
+
* @default - No separate config file, jest settings are stored in package.json
|
|
493
|
+
*/
|
|
494
|
+
readonly configFilePath?: string;
|
|
495
|
+
/**
|
|
496
|
+
* Jest configuration.
|
|
497
|
+
* @default - default jest configuration
|
|
498
|
+
*/
|
|
499
|
+
readonly jestConfig?: JestConfigOptions;
|
|
500
|
+
/**
|
|
501
|
+
* Additional options to pass to the Jest CLI invocation
|
|
502
|
+
* @default - no extra options
|
|
503
|
+
*/
|
|
504
|
+
readonly extraCliOptions?: string[];
|
|
505
|
+
}
|
|
506
|
+
export interface CoverageThreshold {
|
|
507
|
+
readonly branches?: number;
|
|
508
|
+
readonly functions?: number;
|
|
509
|
+
readonly lines?: number;
|
|
510
|
+
readonly statements?: number;
|
|
511
|
+
}
|
|
512
|
+
export declare enum UpdateSnapshot {
|
|
513
|
+
/**
|
|
514
|
+
* Always update snapshots in "test" task.
|
|
515
|
+
*/
|
|
516
|
+
ALWAYS = "always",
|
|
517
|
+
/**
|
|
518
|
+
* Never update snapshots in "test" task and create a separate "test:update" task.
|
|
519
|
+
*/
|
|
520
|
+
NEVER = "never"
|
|
521
|
+
}
|
|
522
|
+
export interface HasteConfig {
|
|
523
|
+
readonly computeSha1?: boolean;
|
|
524
|
+
readonly defaultPlatform?: string | undefined;
|
|
525
|
+
readonly hasteImplModulePath?: string;
|
|
526
|
+
readonly platforms?: Array<string>;
|
|
527
|
+
readonly throwOnModuleCollision?: boolean;
|
|
528
|
+
}
|
|
529
|
+
export declare class JestReporter {
|
|
530
|
+
private readonly name;
|
|
531
|
+
private readonly options?;
|
|
532
|
+
constructor(name: string, options?: {
|
|
533
|
+
[key: string]: any;
|
|
534
|
+
} | undefined);
|
|
535
|
+
/**
|
|
536
|
+
* @jsii ignore
|
|
537
|
+
* @internal
|
|
538
|
+
*/
|
|
539
|
+
toJSON(): any;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Installs the following npm scripts:
|
|
543
|
+
*
|
|
544
|
+
* - `test`, intended for testing locally and in CI. Will update snapshots unless `updateSnapshot: UpdateSnapshot: NEVER` is set.
|
|
545
|
+
* - `test:watch`, intended for automatically rerunning tests when files change.
|
|
546
|
+
* - `test:update`, intended for testing locally and updating snapshots to match the latest unit under test. Only available when `updateSnapshot: UpdateSnapshot: NEVER`.
|
|
547
|
+
*
|
|
548
|
+
*/
|
|
549
|
+
export declare class Jest extends Component {
|
|
550
|
+
/**
|
|
551
|
+
* Returns the singletone Jest component of a project or undefined if there is none.
|
|
552
|
+
*/
|
|
553
|
+
static of(project: Project): Jest | undefined;
|
|
554
|
+
/**
|
|
555
|
+
* Escape hatch.
|
|
556
|
+
*/
|
|
557
|
+
readonly config: any;
|
|
558
|
+
/**
|
|
559
|
+
* Jest version, including `@` symbol, like `@^29`
|
|
560
|
+
*/
|
|
561
|
+
readonly jestVersion: string;
|
|
562
|
+
/**
|
|
563
|
+
* Jest config file. `undefined` if settings are written to `package.json`
|
|
564
|
+
*/
|
|
565
|
+
readonly file?: JsonFile;
|
|
566
|
+
private readonly testMatch;
|
|
567
|
+
private readonly ignorePatterns;
|
|
568
|
+
private readonly watchIgnorePatterns;
|
|
569
|
+
private readonly coverageReporters;
|
|
570
|
+
private readonly reporters;
|
|
571
|
+
private readonly jestConfig?;
|
|
572
|
+
private readonly extraCliOptions;
|
|
573
|
+
private _snapshotResolver;
|
|
574
|
+
constructor(project: NodeProject, options?: JestOptions);
|
|
575
|
+
/**
|
|
576
|
+
* Adds a test match pattern.
|
|
577
|
+
* @param pattern glob pattern to match for tests
|
|
578
|
+
*/
|
|
579
|
+
addTestMatch(pattern: string): void;
|
|
580
|
+
/**
|
|
581
|
+
* Adds a watch ignore pattern.
|
|
582
|
+
* @param pattern The pattern (regular expression).
|
|
583
|
+
*/
|
|
584
|
+
addWatchIgnorePattern(pattern: string): void;
|
|
585
|
+
addIgnorePattern(pattern: string): void;
|
|
586
|
+
addReporter(reporter: JestReporter): void;
|
|
587
|
+
/**
|
|
588
|
+
* Adds a a setup file to Jest's setupFiles configuration.
|
|
589
|
+
* @param file File path to setup file
|
|
590
|
+
*/
|
|
591
|
+
addSetupFile(file: string): void;
|
|
592
|
+
/**
|
|
593
|
+
* Adds a a setup file to Jest's setupFilesAfterEnv configuration.
|
|
594
|
+
* @param file File path to setup file
|
|
595
|
+
*/
|
|
596
|
+
addSetupFileAfterEnv(file: string): void;
|
|
597
|
+
addSnapshotResolver(file: string): void;
|
|
598
|
+
private configureTestCommand;
|
|
599
|
+
}
|