node
node(
options?):object
Defined in: presets/node.ts:20
Vitest preset for Node.js libraries and CLI tools. No DOM globals; runs tests in the Node environment.
Parameters
Section titled “Parameters”options?
Section titled “options?”{ }
Returns
Section titled “Returns”object
test:
object
test.environment
Section titled “test.environment”environment:
string="node"
test.exclude
Section titled “test.exclude”exclude:
string[]
test.fsModuleCachePath
Section titled “test.fsModuleCachePath”fsModuleCachePath:
string=MODULE_CACHE_PATH
test.hookTimeout
Section titled “test.hookTimeout”hookTimeout:
number=TEST_TIMEOUT_MS
test.include
Section titled “test.include”include:
string[]
test.outputFile
Section titled “test.outputFile”outputFile:
object
test.outputFile.junit
Section titled “test.outputFile.junit”junit:
string="./test-report.junit.xml"
test.reporters
Section titled “test.reporters”reporters:
string[]
test.testTimeout
Section titled “test.testTimeout”testTimeout:
number=TEST_TIMEOUT_MS