close
logo
Rstest
Guide
Config
API
English
简体中文
Guide
Config
API
English
简体中文
logo
Rstest
Overview

Test Configurations

root
name
include
exclude
setupFiles
projects
update
globals
passWithNoTests
includeSource
testNamePattern
env
retry
testTimeout
hookTimeout
maxConcurrency
pool
isolate
testEnvironment
clearMocks
resetMocks
restoreMocks
unstubEnvs
unstubGlobals
coverage
reporters
hideSkippedTests
slowTestThreshold
snapshotFormat
resolveSnapshotPath
printConsoleTrace
onConsoleLog
disableConsoleIntercept

Build Configurations

plugins
source
output
resolve
tools
dev
performance
📝 Edit this page on GitHub
Previous Pageplugins
Next Pageoutput

#source

Options for input source code.

#source.decorators source.decoratorssource.decorators

Used to configure the decorators syntax.

If you are using TypeScript's experimentalDecorators, you should set source.decorators.version to legacy in this case.

#source.define source.definesource.define

Replaces variables in your code with other values or expressions at compile time. This can be useful for injecting env variables and other information to the code during build time.

#source.exclude source.excludesource.exclude

Exclude JavaScript or TypeScript files that do not need to be transformed by SWC.

NOTE

Files configured in source.exclude will not be transformed by SWC, but the referenced files will still be bundled into the outputs.

If you want certain files not to be bundled into the outputs, you can use output.externals or Rspack's IgnorePlugin.

#source.include source.includesource.include

Specify additional JavaScript files that need to be compiled.

#source.tsconfigPath source.tsconfigPathsource.tsconfigPath

Configure a custom tsconfig.json file path to use, can be a relative or absolute path.