@hanseltime/pkgtest / RunOptions
Interface: RunOptions
Properties
collectLogFilesOn?
optionalcollectLogFilesOn:CollectLogFilesOn
If set, pkgtest will scan logs during setup calls for any detected log files and then copy them to the log collection folder on the system when:
- Error - only an error triggers a failure of an exec
- All - any time we see a log file mentioned regardless of failure
Note: this is mainly meant for CI processes
collectLogFilesStages?
optionalcollectLogFilesStages:CollectLogFileStages[]
configPath?
optionalconfigPath:string
The path of the config file to use - if not supplied obeys default search rules
debug?
optionaldebug:boolean
If set to true, this provides additional levels of logging (i.e. the stdout of each test)
failFast?
optionalfailFast:boolean
Immediately stop running tests after a failure
filters?
optionalfilters:EntryFilterOptions&object
For every supplied filter, the tests that would be created via the configs will be paired down to only thouse that match all filters provided
Type declaration
binTestNames?
optionalbinTestNames:string[]
A string match/regex filter to only run bins that match
fileTestNames?
optionalfileTestNames:string[]
A glob filter of file names to run (relative to the cwd root)
installOnly?
optionalinstallOnly:boolean
This means we will create the test projects and then end. This is helpful for 2 scenarios:
- If you just want to have a test project created and then access it afterwards to test config with "--preserve"
- If you want to pre-cache dependencies before running tests separately
iPreserveResources?
optionaliPreserveResources:IPreserveResourcesFn
Interactive Preserve resources -
isCI
isCI:
boolean
If true, we've detected a ci environment - used for some determinations around yarn install
noYarnv1CacheClean?
optionalnoYarnv1CacheClean:boolean
Yarn v1 will aggresively expand its local cache when doing the import of the packages. As a result,
we make sure to run a yarn cache clean
parallel
parallel:
number
The number of test suites to run in parallel
preserveResources?
optionalpreserveResources:boolean
If set to true, this will not clean up the test project directories that were created
Important! Only use this for debugging pkgtests or in containers that will have their volumes cleaned up directly after running in a short lived environment. This will populate your temporary directory with large amounts of node modules, etc.
timeout?
optionaltimeout:number
The max amount of time for a test to run (keep in mind, this is just the call to running the pkgTest script and not installation)
Defaults to 2000
updateLocks?
optionalupdateLocks:boolean
If set to true, and locks: false is not set in the config, this will update any changes to the lock files in test projects to the lockfiles folder