Class JestConfigOptions.Jsii$Proxy
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- io.github.cdklabs.projen.javascript.JestConfigOptions.Jsii$Proxy
-
- All Implemented Interfaces:
JestConfigOptions,software.amazon.jsii.JsiiSerializable
- Enclosing interface:
- JestConfigOptions
@Stability(Experimental) @Internal public static final class JestConfigOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements JestConfigOptions
An implementation forJestConfigOptions
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface io.github.cdklabs.projen.javascript.JestConfigOptions
JestConfigOptions.Builder, JestConfigOptions.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsii$Proxy(JestConfigOptions.Builder builder)Constructor that initializes the object based on literal property values passed by theJestConfigOptions.Builder.protectedJsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)Constructor that initializes the object based on values retrieved from the JsiiObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode$jsii$toJson()booleanequals(Object o)Map<String,Object>getAdditionalOptions()(experimental) Escape hatch to allow any value.BooleangetAutomock()(experimental) This option tells Jest that all imported modules in your tests should be mocked automatically.ObjectgetBail()(experimental) By default, Jest runs all tests and produces all errors into the console upon completion.StringgetCacheDirectory()(experimental) The directory where Jest should store its cached dependency information.BooleangetClearMocks()(experimental) Automatically clear mock calls and instances before every test.BooleangetCollectCoverage()(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.StringgetCoverageDirectory()(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.StringgetCoverageProvider()(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.CoverageThresholdgetCoverageThreshold()(experimental) Specify the global coverage thresholds.StringgetDependencyExtractor()(experimental) This option allows the use of a custom dependency extractor.ObjectgetDisplayName()(experimental) Allows for a label to be printed alongside a test while it is running.BooleangetErrorOnDeprecated()(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.ObjectgetGlobals()(experimental) A set of global variables that need to be available in all test environments.StringgetGlobalSetup()(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.StringgetGlobalTeardown()(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.HasteConfiggetHaste()(experimental) This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.BooleangetInjectGlobals()(experimental) Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment.NumbergetMaxConcurrency()(experimental) A number limiting the number of tests that are allowed to run at the same time when using test.concurrent.ObjectgetMaxWorkers()(experimental) Specifies the maximum number of workers the worker-pool will spawn for running tests.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.BooleangetNotify()(experimental) Activates notifications for test results.StringgetNotifyMode()(experimental) Specifies notification mode.StringgetPreset()(experimental) A preset that is used as a base for Jest's configuration.StringgetPrettierPath()(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<JestReporter>getReporters()(experimental) Use this configuration option to add custom reporters to Jest.BooleangetResetMocks()(experimental) Automatically reset mock state before every test.BooleangetResetModules()(experimental) By default, each test file gets its own independent module registry.StringgetResolver()(experimental) This option allows the use of a custom resolver.BooleangetRestoreMocks()(experimental) Automatically restore mock state before every test.StringgetRootDir()(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.StringgetRunner()(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.NumbergetSlowTestThreshold()(experimental) The number of seconds after which a test is considered as slow and reported as such in the results.StringgetSnapshotResolver()(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.StringgetTestEnvironment()(experimental) The test environment that will be used for testing.ObjectgetTestEnvironmentOptions()(experimental) Test environment options that will be passed to the testEnvironment.NumbergetTestFailureExitCode()(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.ObjectgetTestRegex()(experimental) The pattern or patterns Jest uses to detect test files.StringgetTestResultsProcessor()(experimental) This option allows the use of a custom results processor.StringgetTestRunner()(experimental) This option allows the use of a custom test runner.StringgetTestSequencer()(experimental) This option allows you to use a custom sequencer instead of Jest's default.NumbergetTestTimeout()(experimental) Default timeout of a test in milliseconds.StringgetTestURL()(experimental) This option sets the URL for the jsdom environment.StringgetTimers()(experimental) Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.Map<String,Transform>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.BooleangetVerbose()(experimental) Indicates whether each individual test should be reported during the run.BooleangetWatchman()(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.List<WatchPlugin>getWatchPlugins()Default: -inthashCode()
-
-
-
Constructor Detail
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.- Parameters:
objRef- Reference to the JSII managed object.
-
Jsii$Proxy
protected Jsii$Proxy(JestConfigOptions.Builder builder)
Constructor that initializes the object based on literal property values passed by theJestConfigOptions.Builder.
-
-
Method Detail
-
getAdditionalOptions
public final Map<String,Object> getAdditionalOptions()
Description copied from interface:JestConfigOptions(experimental) Escape hatch to allow any value.- Specified by:
getAdditionalOptionsin interfaceJestConfigOptions
-
getAutomock
public final Boolean getAutomock()
Description copied from interface:JestConfigOptions(experimental) This option tells Jest that all imported modules in your tests should be mocked automatically.All modules used in your tests will have a replacement implementation, keeping the API surface
Default: - false
- Specified by:
getAutomockin interfaceJestConfigOptions
-
getBail
public final Object getBail()
Description copied from interface:JestConfigOptions(experimental) By default, Jest runs all tests and produces all errors into the console upon completion.The 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
- Specified by:
getBailin interfaceJestConfigOptions
-
getCacheDirectory
public final String getCacheDirectory()
Description copied from interface:JestConfigOptions(experimental) The directory where Jest should store its cached dependency information.Default: - "/tmp/
" - Specified by:
getCacheDirectoryin interfaceJestConfigOptions
-
getClearMocks
public final Boolean getClearMocks()
Description copied from interface:JestConfigOptions(experimental) Automatically clear mock calls and instances before every test.Equivalent to calling jest.clearAllMocks() before each test. This does not remove any mock implementation that may have been provided
Default: true
- Specified by:
getClearMocksin interfaceJestConfigOptions
-
getCollectCoverage
public final Boolean getCollectCoverage()
Description copied from interface:JestConfigOptions(experimental) Indicates whether the coverage information should be collected while executing the test.Because this retrofits all executed files with coverage collection statements, it may significantly slow down your tests
Default: true
- Specified by:
getCollectCoveragein interfaceJestConfigOptions
-
getCollectCoverageFrom
public final List<String> getCollectCoverageFrom()
Description copied from interface:JestConfigOptions(experimental) An array of glob patterns indicating a set of files for which coverage information should be collected.Default: - undefined
- Specified by:
getCollectCoverageFromin interfaceJestConfigOptions
-
getCoverageDirectory
public final String getCoverageDirectory()
Description copied from interface:JestConfigOptions(experimental) The directory where Jest should output its coverage files.Default: "coverage"
- Specified by:
getCoverageDirectoryin interfaceJestConfigOptions
-
getCoveragePathIgnorePatterns
public final List<String> getCoveragePathIgnorePatterns()
Description copied from interface:JestConfigOptions(experimental) An array of regexp pattern strings that are matched against all file paths before executing the test.If the file path matches any of the patterns, coverage information will be skipped
Default: "/node_modules/"
- Specified by:
getCoveragePathIgnorePatternsin interfaceJestConfigOptions
-
getCoverageProvider
public final String getCoverageProvider()
Description copied from interface:JestConfigOptions(experimental) Indicates which provider should be used to instrument code for coverage.Allowed values are babel (default) or v8
Default: - "babel"
- Specified by:
getCoverageProviderin interfaceJestConfigOptions
-
getCoverageReporters
public final List<String> getCoverageReporters()
Description copied from interface:JestConfigOptions(experimental) A list of reporter names that Jest uses when writing coverage reports.Any istanbul reporter can be used
Default: - ["json", "lcov", "text", "clover", "cobertura"]
- Specified by:
getCoverageReportersin interfaceJestConfigOptions
-
getCoverageThreshold
public final CoverageThreshold getCoverageThreshold()
Description copied from interface:JestConfigOptions(experimental) Specify the global coverage thresholds.This 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
- Specified by:
getCoverageThresholdin interfaceJestConfigOptions
-
getDependencyExtractor
public final String getDependencyExtractor()
Description copied from interface:JestConfigOptions(experimental) This option allows the use of a custom dependency extractor.It must be a node module that exports an object with an extract function
Default: - undefined
- Specified by:
getDependencyExtractorin interfaceJestConfigOptions
-
getDisplayName
public final Object getDisplayName()
Description copied from interface:JestConfigOptions(experimental) Allows for a label to be printed alongside a test while it is running.Default: - undefined
- Specified by:
getDisplayNamein interfaceJestConfigOptions
-
getErrorOnDeprecated
public final Boolean getErrorOnDeprecated()
Description copied from interface:JestConfigOptions(experimental) Make calling deprecated APIs throw helpful error messages.Useful for easing the upgrade process.
Default: - false
- Specified by:
getErrorOnDeprecatedin interfaceJestConfigOptions
-
getExtraGlobals
public final List<String> getExtraGlobals()
Description copied from interface:JestConfigOptions(experimental) Test files run inside a vm, which slows calls to global context properties (e.g. Math). With this option you can specify extra properties to be defined inside the vm for faster lookups.Default: - undefined
- Specified by:
getExtraGlobalsin interfaceJestConfigOptions
-
getForceCoverageMatch
public final List<String> getForceCoverageMatch()
Description copied from interface:JestConfigOptions(experimental) Test files are normally ignored from collecting code coverage.With this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
Default: - ['']
- Specified by:
getForceCoverageMatchin interfaceJestConfigOptions
-
getGlobals
public final Object getGlobals()
Description copied from interface:JestConfigOptions(experimental) A set of global variables that need to be available in all test environments.Default: - {}
- Specified by:
getGlobalsin interfaceJestConfigOptions
-
getGlobalSetup
public final String getGlobalSetup()
Description copied from interface:JestConfigOptions(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.This function gets Jest's globalConfig object as a parameter.
Default: - undefined
- Specified by:
getGlobalSetupin interfaceJestConfigOptions
-
getGlobalTeardown
public final String getGlobalTeardown()
Description copied from interface:JestConfigOptions(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.This function gets Jest's globalConfig object as a parameter.
Default: - undefined
- Specified by:
getGlobalTeardownin interfaceJestConfigOptions
-
getHaste
public final HasteConfig getHaste()
Description copied from interface:JestConfigOptions(experimental) This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.Default: - {}
- Specified by:
getHastein interfaceJestConfigOptions
-
getInjectGlobals
public final Boolean getInjectGlobals()
Description copied from interface:JestConfigOptions(experimental) Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment. If you set this to false, you should import from.Default: - true
- Specified by:
getInjectGlobalsin interfaceJestConfigOptions
-
getMaxConcurrency
public final Number getMaxConcurrency()
Description copied from interface:JestConfigOptions(experimental) A number limiting the number of tests that are allowed to run at the same time when using test.concurrent. Any test above this limit will be queued and executed once a slot is released.Default: - 5
- Specified by:
getMaxConcurrencyin interfaceJestConfigOptions
-
getMaxWorkers
public final Object getMaxWorkers()
Description copied from interface:JestConfigOptions(experimental) Specifies the maximum number of workers the worker-pool will spawn for running tests.In single run mode, this defaults to the number of the cores available on your machine minus one for the main thread In watch mode, this defaults to half of the available cores on your machine. For environments with variable CPUs available, you can use percentage based configuration: "maxWorkers": "50%"
Default: - the number of the cores available on your machine minus one for the main thread
- Specified by:
getMaxWorkersin interfaceJestConfigOptions
-
getModuleDirectories
public final List<String> getModuleDirectories()
Description copied from interface:JestConfigOptions(experimental) An array of directory names to be searched recursively up from the requiring module's location.Setting 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"]
- Specified by:
getModuleDirectoriesin interfaceJestConfigOptions
-
getModuleFileExtensions
public final List<String> getModuleFileExtensions()
Description copied from interface:JestConfigOptions(experimental) An array of file extensions your modules use.If 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"]
- Specified by:
getModuleFileExtensionsin interfaceJestConfigOptions
-
getModuleNameMapper
public final Map<String,Object> getModuleNameMapper()
Description copied from interface:JestConfigOptions(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.Default: - null
- Specified by:
getModuleNameMapperin interfaceJestConfigOptions
-
getModulePathIgnorePatterns
public final List<String> getModulePathIgnorePatterns()
Description copied from interface:JestConfigOptions(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.If a given module's path matches any of the patterns, it will not be require()-able in the test environment.
Default: - []
- Specified by:
getModulePathIgnorePatternsin interfaceJestConfigOptions
-
getModulePaths
public final List<String> getModulePaths()
Description copied from interface:JestConfigOptions(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.Use the
string token to include the path to your project's root directory. Example: [" /app/"]. Default: - []
- Specified by:
getModulePathsin interfaceJestConfigOptions
-
getNotify
public final Boolean getNotify()
Description copied from interface:JestConfigOptions(experimental) Activates notifications for test results.Default: - false
- Specified by:
getNotifyin interfaceJestConfigOptions
-
getNotifyMode
public final String getNotifyMode()
Description copied from interface:JestConfigOptions(experimental) Specifies notification mode.Requires notify: true
Default: - failure-change
- Specified by:
getNotifyModein interfaceJestConfigOptions
-
getPreset
public final String getPreset()
Description copied from interface:JestConfigOptions(experimental) A preset that is used as a base for Jest's configuration.A preset should point to an npm module that has a jest-preset.json or jest-preset.js file at the root.
Default: - undefined
- Specified by:
getPresetin interfaceJestConfigOptions
-
getPrettierPath
public final String getPrettierPath()
Description copied from interface:JestConfigOptions(experimental) Sets the path to the prettier node module used to update inline snapshots.Default: - "prettier"
- Specified by:
getPrettierPathin interfaceJestConfigOptions
-
getProjects
public final List<Object> getProjects()
Description copied from interface:JestConfigOptions(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.This is great for monorepos or when working on multiple projects at the same time.
Default: - undefined
- Specified by:
getProjectsin interfaceJestConfigOptions
-
getReporters
public final List<JestReporter> getReporters()
Description copied from interface:JestConfigOptions(experimental) Use this configuration option to add custom reporters to Jest.A custom reporter is a class that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be called when any of those events occurs.
Default: - undefined
- Specified by:
getReportersin interfaceJestConfigOptions
-
getResetMocks
public final Boolean getResetMocks()
Description copied from interface:JestConfigOptions(experimental) Automatically reset mock state before every test.Equivalent 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
- Specified by:
getResetMocksin interfaceJestConfigOptions
-
getResetModules
public final Boolean getResetModules()
Description copied from interface:JestConfigOptions(experimental) By default, each test file gets its own independent module registry.Enabling resetModules goes a step further and resets the module registry before running each individual test.
Default: - false
- Specified by:
getResetModulesin interfaceJestConfigOptions
-
getResolver
public final String getResolver()
Description copied from interface:JestConfigOptions(experimental) This option allows the use of a custom resolver.https://jestjs.io/docs/en/configuration#resolver-string
Default: - undefined
- Specified by:
getResolverin interfaceJestConfigOptions
-
getRestoreMocks
public final Boolean getRestoreMocks()
Description copied from interface:JestConfigOptions(experimental) Automatically restore mock state before every test.Equivalent 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
- Specified by:
getRestoreMocksin interfaceJestConfigOptions
-
getRootDir
public final String getRootDir()
Description copied from interface:JestConfigOptions(experimental) The root directory that Jest should scan for tests and modules within.If 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
- Specified by:
getRootDirin interfaceJestConfigOptions
-
getRoots
public final List<String> getRoots()
Description copied from interface:JestConfigOptions(experimental) A list of paths to directories that Jest should use to search for files in.Default: - ["
"] - Specified by:
getRootsin interfaceJestConfigOptions
-
getRunner
public final String getRunner()
Description copied from interface:JestConfigOptions(experimental) This option allows you to use a custom runner instead of Jest's default test runner.Default: - "jest-runner"
- Specified by:
getRunnerin interfaceJestConfigOptions
-
getSetupFiles
public final List<String> getSetupFiles()
Description copied from interface:JestConfigOptions(experimental) A list of paths to modules that run some code to configure or set up the testing environment.Each 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: - []
- Specified by:
getSetupFilesin interfaceJestConfigOptions
-
getSetupFilesAfterEnv
public final List<String> getSetupFilesAfterEnv()
Description copied from interface:JestConfigOptions(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.Since 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: - []
- Specified by:
getSetupFilesAfterEnvin interfaceJestConfigOptions
-
getSlowTestThreshold
public final Number getSlowTestThreshold()
Description copied from interface:JestConfigOptions(experimental) The number of seconds after which a test is considered as slow and reported as such in the results.Default: - 5
- Specified by:
getSlowTestThresholdin interfaceJestConfigOptions
-
getSnapshotResolver
public final String getSnapshotResolver()
Description copied from interface:JestConfigOptions(experimental) The path to a module that can resolve test<->snapshot path.This config option lets you customize where Jest stores snapshot files on disk.
Default: - undefined
- Specified by:
getSnapshotResolverin interfaceJestConfigOptions
-
getSnapshotSerializers
public final List<String> getSnapshotSerializers()
Description copied from interface:JestConfigOptions(experimental) A list of paths to snapshot serializer modules Jest should use for snapshot testing.Default: = []
- Specified by:
getSnapshotSerializersin interfaceJestConfigOptions
-
getTestEnvironment
public final String getTestEnvironment()
Description copied from interface:JestConfigOptions(experimental) The test environment that will be used for testing.The 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"
- Specified by:
getTestEnvironmentin interfaceJestConfigOptions
-
getTestEnvironmentOptions
public final Object getTestEnvironmentOptions()
Description copied from interface:JestConfigOptions(experimental) Test environment options that will be passed to the testEnvironment.The relevant options depend on the environment.
Default: - {}
- Specified by:
getTestEnvironmentOptionsin interfaceJestConfigOptions
-
getTestFailureExitCode
public final Number getTestFailureExitCode()
Description copied from interface:JestConfigOptions(experimental) The exit code Jest returns on test failure.Default: - 1
- Specified by:
getTestFailureExitCodein interfaceJestConfigOptions
-
getTestMatch
public final List<String> getTestMatch()
Description copied from interface:JestConfigOptions(experimental) The glob patterns Jest uses to detect test files.By 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)']
- Specified by:
getTestMatchin interfaceJestConfigOptions
-
getTestPathIgnorePatterns
public final List<String> getTestPathIgnorePatterns()
Description copied from interface:JestConfigOptions(experimental) An array of regexp pattern strings that are matched against all test paths before executing the test.If the test path matches any of the patterns, it will be skipped.
Default: - ["/node_modules/"]
- Specified by:
getTestPathIgnorePatternsin interfaceJestConfigOptions
-
getTestRegex
public final Object getTestRegex()
Description copied from interface:JestConfigOptions(experimental) The pattern or patterns Jest uses to detect test files.By 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?$
- Specified by:
getTestRegexin interfaceJestConfigOptions
-
getTestResultsProcessor
public final String getTestResultsProcessor()
Description copied from interface:JestConfigOptions(experimental) This option allows the use of a custom results processor.Default: - undefined
- Specified by:
getTestResultsProcessorin interfaceJestConfigOptions
-
getTestRunner
public final String getTestRunner()
Description copied from interface:JestConfigOptions(experimental) This option allows the use of a custom test runner.The default is jasmine2. A custom test runner can be provided by specifying a path to a test runner implementation.
Default: - "jasmine2"
- Specified by:
getTestRunnerin interfaceJestConfigOptions
-
getTestSequencer
public final String getTestSequencer()
Description copied from interface:JestConfigOptions(experimental) This option allows you to use a custom sequencer instead of Jest's default.Sort may optionally return a Promise.
Default: - "@jest/test-sequencer"
- Specified by:
getTestSequencerin interfaceJestConfigOptions
-
getTestTimeout
public final Number getTestTimeout()
Description copied from interface:JestConfigOptions(experimental) Default timeout of a test in milliseconds.Default: - 5000
- Specified by:
getTestTimeoutin interfaceJestConfigOptions
-
getTestURL
public final String getTestURL()
Description copied from interface:JestConfigOptions(experimental) This option sets the URL for the jsdom environment.It is reflected in properties such as location.href.
Default: - "http://localhost"
- Specified by:
getTestURLin interfaceJestConfigOptions
-
getTimers
public final String getTimers()
Description copied from interface:JestConfigOptions(experimental) Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.Fake 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"
- Specified by:
getTimersin interfaceJestConfigOptions
-
getTransform
public final Map<String,Transform> getTransform()
Description copied from interface:JestConfigOptions(experimental) A map from regular expressions to paths to transformers.A transformer is a module that provides a synchronous function for transforming source files.
Default: - {"\\.[jt]sx?$": "babel-jest"}
- Specified by:
getTransformin interfaceJestConfigOptions
-
getTransformIgnorePatterns
public final List<String> getTransformIgnorePatterns()
Description copied from interface:JestConfigOptions(experimental) An array of regexp pattern strings that are matched against all source file paths before transformation.If the test path matches any of the patterns, it will not be transformed.
Default: - ["/node_modules/", "\\.pnp\\.[^\\\/]+$"]
- Specified by:
getTransformIgnorePatternsin interfaceJestConfigOptions
-
getUnmockedModulePathPatterns
public final List<String> getUnmockedModulePathPatterns()
Description copied from interface:JestConfigOptions(experimental) An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them.If a module's path matches any of the patterns in this list, it will not be automatically mocked by the module loader.
Default: - []
- Specified by:
getUnmockedModulePathPatternsin interfaceJestConfigOptions
-
getVerbose
public final Boolean getVerbose()
Description copied from interface:JestConfigOptions(experimental) Indicates whether each individual test should be reported during the run.All 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
- Specified by:
getVerbosein interfaceJestConfigOptions
-
getWatchman
public final Boolean getWatchman()
Description copied from interface:JestConfigOptions(experimental) Whether to use watchman for file crawling.Default: - true
- Specified by:
getWatchmanin interfaceJestConfigOptions
-
getWatchPathIgnorePatterns
public final List<String> getWatchPathIgnorePatterns()
Description copied from interface:JestConfigOptions(experimental) An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode.If the file path matches any of the patterns, when it is updated, it will not trigger a re-run of tests.
Default: - []
- Specified by:
getWatchPathIgnorePatternsin interfaceJestConfigOptions
-
getWatchPlugins
public final List<WatchPlugin> getWatchPlugins()
Description copied from interface:JestConfigOptionsDefault: -- Specified by:
getWatchPluginsin interfaceJestConfigOptions
-
$jsii$toJson
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
- Specified by:
$jsii$toJsonin interfacesoftware.amazon.jsii.JsiiSerializable
-
-