@Stability(value=Experimental) @Internal public static final class JestConfigOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements JestConfigOptions
JestConfigOptionssoftware.amazon.jsii.JsiiObject.InitializationModeJestConfigOptions.Builder, JestConfigOptions.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(JestConfigOptions.Builder builder)
Constructor that initializes the object based on literal property values passed by the
JestConfigOptions.Builder. |
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Boolean |
getAutomock()
(experimental) This option tells Jest that all imported modules in your tests should be mocked automatically.
|
Object |
getBail()
(experimental) By default, Jest runs all tests and produces all errors into the console upon completion.
|
String |
getCacheDirectory()
(experimental) The directory where Jest should store its cached dependency information.
|
Boolean |
getClearMocks()
(experimental) Automatically clear mock calls and instances before every test.
|
Boolean |
getCollectCoverage()
(experimental) Indicates whether the coverage information should be collected while executing the test.
|
List<String> |
getCollectCoverageFrom()
(experimental) An array of glob patterns indicating a set of files for which coverage information should be collected.
|
String |
getCoverageDirectory()
(experimental) The directory where Jest should output its coverage files.
|
List<String> |
getCoveragePathIgnorePatterns()
(experimental) An array of regexp pattern strings that are matched against all file paths before executing the test.
|
String |
getCoverageProvider()
(experimental) Indicates which provider should be used to instrument code for coverage.
|
List<String> |
getCoverageReporters()
(experimental) A list of reporter names that Jest uses when writing coverage reports.
|
CoverageThreshold |
getCoverageThreshold()
(experimental) Specify the global coverage thresholds.
|
String |
getDependencyExtractor()
(experimental) This option allows the use of a custom dependency extractor.
|
Object |
getDisplayName()
(experimental) Allows for a label to be printed alongside a test while it is running.
|
Boolean |
getErrorOnDeprecated()
(experimental) Make calling deprecated APIs throw helpful error messages.
|
List<String> |
getExtraGlobals()
(experimental) Test files run inside a vm, which slows calls to global context properties (e.g.
|
List<String> |
getForceCoverageMatch()
(experimental) Test files are normally ignored from collecting code coverage.
|
Object |
getGlobals()
(experimental) A set of global variables that need to be available in all test environments.
|
String |
getGlobalSetup()
(experimental) This option allows the use of a custom global setup module which exports an async function that is triggered once before all test suites.
|
String |
getGlobalTeardown()
(experimental) This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites.
|
HasteConfig |
getHaste()
(experimental) This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.
|
Boolean |
getInjectGlobals()
(experimental) Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment.
|
Number |
getMaxConcurrency()
(experimental) A number limiting the number of tests that are allowed to run at the same time when using test.concurrent.
|
List<String> |
getModuleDirectories()
(experimental) An array of directory names to be searched recursively up from the requiring module's location.
|
List<String> |
getModuleFileExtensions()
(experimental) An array of file extensions your modules use.
|
Map<String,Object> |
getModuleNameMapper()
(experimental) A map from regular expressions to module names or to arrays of module names that allow to stub out resources, like images or styles with a single module.
|
List<String> |
getModulePathIgnorePatterns()
(experimental) An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader.
|
List<String> |
getModulePaths()
(experimental) An alternative API to setting the NODE_PATH env variable, modulePaths is an array of absolute paths to additional locations to search when resolving modules.
|
Boolean |
getNotify()
(experimental) Activates notifications for test results.
|
String |
getNotifyMode()
(experimental) Specifies notification mode.
|
String |
getPreset()
(experimental) A preset that is used as a base for Jest's configuration.
|
String |
getPrettierPath()
(experimental) Sets the path to the prettier node module used to update inline snapshots.
|
List<Object> |
getProjects()
(experimental) When the projects configuration is provided with an array of paths or glob patterns, Jest will run tests in all of the specified projects at the same time.
|
List<Object> |
getReporters()
(experimental) Use this configuration option to add custom reporters to Jest.
|
Boolean |
getResetMocks()
(experimental) Automatically reset mock state before every test.
|
Boolean |
getResetModules()
(experimental) By default, each test file gets its own independent module registry.
|
String |
getResolver()
(experimental) This option allows the use of a custom resolver.
|
Boolean |
getRestoreMocks()
(experimental) Automatically restore mock state before every test.
|
String |
getRootDir()
(experimental) The root directory that Jest should scan for tests and modules within.
|
List<String> |
getRoots()
(experimental) A list of paths to directories that Jest should use to search for files in.
|
String |
getRunner()
(experimental) This option allows you to use a custom runner instead of Jest's default test runner.
|
List<String> |
getSetupFiles()
(experimental) A list of paths to modules that run some code to configure or set up the testing environment.
|
List<String> |
getSetupFilesAfterEnv()
(experimental) A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed.
|
Number |
getSlowTestThreshold()
(experimental) The number of seconds after which a test is considered as slow and reported as such in the results.
|
String |
getSnapshotResolver()
(experimental) The path to a module that can resolve test<->snapshot path.
|
List<String> |
getSnapshotSerializers()
(experimental) A list of paths to snapshot serializer modules Jest should use for snapshot testing.
|
String |
getTestEnvironment()
(experimental) The test environment that will be used for testing.
|
Object |
getTestEnvironmentOptions()
(experimental) Test environment options that will be passed to the testEnvironment.
|
Number |
getTestFailureExitCode()
(experimental) The exit code Jest returns on test failure.
|
List<String> |
getTestMatch()
(experimental) The glob patterns Jest uses to detect test files.
|
List<String> |
getTestPathIgnorePatterns()
(experimental) An array of regexp pattern strings that are matched against all test paths before executing the test.
|
Object |
getTestRegex()
(experimental) The pattern or patterns Jest uses to detect test files.
|
String |
getTestResultsProcessor()
(experimental) This option allows the use of a custom results processor.
|
String |
getTestRunner()
(experimental) This option allows the use of a custom test runner.
|
String |
getTestSequencer()
(experimental) This option allows you to use a custom sequencer instead of Jest's default.
|
Number |
getTestTimeout()
(experimental) Default timeout of a test in milliseconds.
|
String |
getTestURL()
(experimental) This option sets the URL for the jsdom environment.
|
String |
getTimers()
(experimental) Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.
|
Map<String,Object> |
getTransform()
(experimental) A map from regular expressions to paths to transformers.
|
List<String> |
getTransformIgnorePatterns()
(experimental) An array of regexp pattern strings that are matched against all source file paths before transformation.
|
List<String> |
getUnmockedModulePathPatterns()
(experimental) An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them.
|
Boolean |
getVerbose()
(experimental) Indicates whether each individual test should be reported during the run.
|
Boolean |
getWatchman()
(experimental) Whether to use watchman for file crawling.
|
List<String> |
getWatchPathIgnorePatterns()
(experimental) An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode.
|
com.fasterxml.jackson.databind.node.ObjectNode |
getWatchPlugins()
Default: -
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(JestConfigOptions.Builder builder)
JestConfigOptions.Builder.public final Boolean getAutomock()
JestConfigOptionsAll modules used in your tests will have a replacement implementation, keeping the API surface
Default: - false
getAutomock in interface JestConfigOptionspublic final Object getBail()
JestConfigOptionsThe bail config option can be used here to have Jest stop running tests after n failures. Setting bail to true is the same as setting bail to 1.
Default: - 0
getBail in interface JestConfigOptionspublic final String getCacheDirectory()
JestConfigOptions
Default: - "/tmp/
getCacheDirectory in interface JestConfigOptionspublic final Boolean getClearMocks()
JestConfigOptionsEquivalent to calling jest.clearAllMocks() before each test. This does not remove any mock implementation that may have been provided
Default: true
getClearMocks in interface JestConfigOptionspublic final Boolean getCollectCoverage()
JestConfigOptionsBecause this retrofits all executed files with coverage collection statements, it may significantly slow down your tests
Default: true
getCollectCoverage in interface JestConfigOptionspublic final List<String> getCollectCoverageFrom()
JestConfigOptionsDefault: - undefined
getCollectCoverageFrom in interface JestConfigOptionspublic final String getCoverageDirectory()
JestConfigOptionsDefault: "coverage"
getCoverageDirectory in interface JestConfigOptionspublic final List<String> getCoveragePathIgnorePatterns()
JestConfigOptionsIf the file path matches any of the patterns, coverage information will be skipped
Default: "/node_modules/"
getCoveragePathIgnorePatterns in interface JestConfigOptionspublic final String getCoverageProvider()
JestConfigOptionsAllowed values are babel (default) or v8
Default: - "babel"
getCoverageProvider in interface JestConfigOptionspublic final List<String> getCoverageReporters()
JestConfigOptionsAny istanbul reporter can be used
Default: - ["json", "lcov", "text", "clover"]
getCoverageReporters in interface JestConfigOptionspublic final CoverageThreshold getCoverageThreshold()
JestConfigOptionsThis will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as global, as a glob, and as a directory or file path. If thresholds aren't met, jest will fail.
Default: - undefined
getCoverageThreshold in interface JestConfigOptionspublic final String getDependencyExtractor()
JestConfigOptionsIt must be a node module that exports an object with an extract function
Default: - undefined
getDependencyExtractor in interface JestConfigOptionspublic final Object getDisplayName()
JestConfigOptionsDefault: - undefined
getDisplayName in interface JestConfigOptionspublic final Boolean getErrorOnDeprecated()
JestConfigOptionsUseful for easing the upgrade process.
Default: - false
getErrorOnDeprecated in interface JestConfigOptionspublic final List<String> getExtraGlobals()
JestConfigOptionsDefault: - undefined
getExtraGlobals in interface JestConfigOptionspublic final List<String> getForceCoverageMatch()
JestConfigOptionsWith this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
Default: - ['']
getForceCoverageMatch in interface JestConfigOptionspublic final Object getGlobals()
JestConfigOptionsDefault: - {}
getGlobals in interface JestConfigOptionspublic final String getGlobalSetup()
JestConfigOptionsThis function gets Jest's globalConfig object as a parameter.
Default: - undefined
getGlobalSetup in interface JestConfigOptionspublic final String getGlobalTeardown()
JestConfigOptionsThis function gets Jest's globalConfig object as a parameter.
Default: - undefined
getGlobalTeardown in interface JestConfigOptionspublic final HasteConfig getHaste()
JestConfigOptionsDefault: - {}
getHaste in interface JestConfigOptionspublic final Boolean getInjectGlobals()
JestConfigOptionsDefault: - true
getInjectGlobals in interface JestConfigOptionspublic final Number getMaxConcurrency()
JestConfigOptionsDefault: - 5
getMaxConcurrency in interface JestConfigOptionspublic final List<String> getModuleDirectories()
JestConfigOptionsSetting this option will override the default, if you wish to still search node_modules for packages include it along with any other options: ["node_modules", "bower_components"]
Default: - ["node_modules"]
getModuleDirectories in interface JestConfigOptionspublic final List<String> getModuleFileExtensions()
JestConfigOptionsIf you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.
Default: - ["js", "json", "jsx", "ts", "tsx", "node"]
getModuleFileExtensions in interface JestConfigOptionspublic final Map<String,Object> getModuleNameMapper()
JestConfigOptionsDefault: - null
getModuleNameMapper in interface JestConfigOptionspublic final List<String> getModulePathIgnorePatterns()
JestConfigOptionsIf a given module's path matches any of the patterns, it will not be require()-able in the test environment.
Default: - []
getModulePathIgnorePatterns in interface JestConfigOptionspublic final List<String> getModulePaths()
JestConfigOptions
Use the
Default: - []
getModulePaths in interface JestConfigOptionspublic final Boolean getNotify()
JestConfigOptionsDefault: - false
getNotify in interface JestConfigOptionspublic final String getNotifyMode()
JestConfigOptionsRequires notify: true
Default: - failure-change
getNotifyMode in interface JestConfigOptionspublic final String getPreset()
JestConfigOptionsA preset should point to an npm module that has a jest-preset.json or jest-preset.js file at the root.
Default: - undefined
getPreset in interface JestConfigOptionspublic final String getPrettierPath()
JestConfigOptionsDefault: - "prettier"
getPrettierPath in interface JestConfigOptionspublic final List<Object> getProjects()
JestConfigOptionsThis is great for monorepos or when working on multiple projects at the same time.
Default: - undefined
getProjects in interface JestConfigOptionspublic final List<Object> getReporters()
JestConfigOptionsA custom reporter is a class that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be called when any of those events occurs.
Default: - undefined
getReporters in interface JestConfigOptionspublic final Boolean getResetMocks()
JestConfigOptionsEquivalent to calling jest.resetAllMocks() before each test. This will lead to any mocks having their fake implementations removed but does not restore their initial implementation.
Default: - false
getResetMocks in interface JestConfigOptionspublic final Boolean getResetModules()
JestConfigOptionsEnabling resetModules goes a step further and resets the module registry before running each individual test.
Default: - false
getResetModules in interface JestConfigOptionspublic final String getResolver()
JestConfigOptionshttps://jestjs.io/docs/en/configuration#resolver-string
Default: - undefined
getResolver in interface JestConfigOptionspublic final Boolean getRestoreMocks()
JestConfigOptionsEquivalent to calling jest.restoreAllMocks() before each test. This will lead to any mocks having their fake implementations removed and restores their initial implementation.
Default: - false
getRestoreMocks in interface JestConfigOptionspublic final String getRootDir()
JestConfigOptionsIf you put your Jest config inside your package.json and want the root directory to be the root of your repo, the value for this config param will default to the directory of the package.json.
Default: - directory of the package.json
getRootDir in interface JestConfigOptionspublic final List<String> getRoots()
JestConfigOptions
Default: - ["
getRoots in interface JestConfigOptionspublic final String getRunner()
JestConfigOptionsDefault: - "jest-runner"
getRunner in interface JestConfigOptionspublic final List<String> getSetupFiles()
JestConfigOptionsEach setupFile will be run once per test file. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself.
Default: - []
getSetupFiles in interface JestConfigOptionspublic final List<String> getSetupFilesAfterEnv()
JestConfigOptionsSince setupFiles executes before the test framework is installed in the environment, this script file presents you the opportunity of running some code immediately after the test framework has been installed in the environment.
Default: - []
getSetupFilesAfterEnv in interface JestConfigOptionspublic final Number getSlowTestThreshold()
JestConfigOptionsDefault: - 5
getSlowTestThreshold in interface JestConfigOptionspublic final String getSnapshotResolver()
JestConfigOptionsThis config option lets you customize where Jest stores snapshot files on disk.
Default: - undefined
getSnapshotResolver in interface JestConfigOptionspublic final List<String> getSnapshotSerializers()
JestConfigOptionsDefault: = []
getSnapshotSerializers in interface JestConfigOptionspublic final String getTestEnvironment()
JestConfigOptionsThe default environment in Jest is a browser-like environment through jsdom. If you are building a node service, you can use the node option to use a node-like environment instead.
Default: - "jsdom"
getTestEnvironment in interface JestConfigOptionspublic final Object getTestEnvironmentOptions()
JestConfigOptionsThe relevant options depend on the environment.
Default: - {}
getTestEnvironmentOptions in interface JestConfigOptionspublic final Number getTestFailureExitCode()
JestConfigOptionsDefault: - 1
getTestFailureExitCode in interface JestConfigOptionspublic final List<String> getTestMatch()
JestConfigOptionsBy default it looks for .js, .jsx, .ts and .tsx files inside of tests folders, as well as any files with a suffix of .test or .spec (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
Default: ['**\/__tests__/**\/*.[jt]s?(x)', '**\/?(*.)+(spec|test).[tj]s?(x)']
getTestMatch in interface JestConfigOptionspublic final List<String> getTestPathIgnorePatterns()
JestConfigOptionsIf the test path matches any of the patterns, it will be skipped.
Default: - ["/node_modules/"]
getTestPathIgnorePatterns in interface JestConfigOptionspublic final Object getTestRegex()
JestConfigOptionsBy default it looks for .js, .jsx, .ts and .tsx files inside of tests folders, as well as any files with a suffix of .test or .spec (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
Default: - (/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$
getTestRegex in interface JestConfigOptionspublic final String getTestResultsProcessor()
JestConfigOptionsDefault: - undefined
getTestResultsProcessor in interface JestConfigOptionspublic final String getTestRunner()
JestConfigOptionsThe default is jasmine2. A custom test runner can be provided by specifying a path to a test runner implementation.
Default: - "jasmine2"
getTestRunner in interface JestConfigOptionspublic final String getTestSequencer()
JestConfigOptionsSort may optionally return a Promise.
Default: - "
getTestSequencer in interface JestConfigOptionspublic final Number getTestTimeout()
JestConfigOptionsDefault: - 5000
getTestTimeout in interface JestConfigOptionspublic final String getTestURL()
JestConfigOptionsIt is reflected in properties such as location.href.
Default: - "http://localhost"
getTestURL in interface JestConfigOptionspublic final String getTimers()
JestConfigOptionsFake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
Default: - "real"
getTimers in interface JestConfigOptionspublic final Map<String,Object> getTransform()
JestConfigOptionsA transformer is a module that provides a synchronous function for transforming source files.
Default: - {"\\.[jt]sx?$": "babel-jest"}
getTransform in interface JestConfigOptionspublic final List<String> getTransformIgnorePatterns()
JestConfigOptionsIf the test path matches any of the patterns, it will not be transformed.
Default: - ["/node_modules/", "\\.pnp\\.[^\\\/]+$"]
getTransformIgnorePatterns in interface JestConfigOptionspublic final List<String> getUnmockedModulePathPatterns()
JestConfigOptionsIf a module's path matches any of the patterns in this list, it will not be automatically mocked by the module loader.
Default: - []
getUnmockedModulePathPatterns in interface JestConfigOptionspublic final Boolean getVerbose()
JestConfigOptionsAll errors will also still be shown on the bottom after execution. Note that if there is only one test file being run it will default to true.
Default: - false
getVerbose in interface JestConfigOptionspublic final Boolean getWatchman()
JestConfigOptionsDefault: - true
getWatchman in interface JestConfigOptionspublic final List<String> getWatchPathIgnorePatterns()
JestConfigOptionsIf the file path matches any of the patterns, when it is updated, it will not trigger a re-run of tests.
Default: - []
getWatchPathIgnorePatterns in interface JestConfigOptionspublic final com.fasterxml.jackson.databind.node.ObjectNode getWatchPlugins()
JestConfigOptionsgetWatchPlugins in interface JestConfigOptions@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2021. All rights reserved.