Appearance
marmotte / vitest/tmpdir
vitest/tmpdir
Functions
createTmpDir()
createTmpDir():
Promise<string>
Defined in: src/vitest/tmpdir.ts:12
Asynchronously creates a unique temporary directory and returns its absolute path.
Returns
Promise<string>
createTmpDirSync()
createTmpDirSync():
string
Defined in: src/vitest/tmpdir.ts:7
Synchronously creates a unique temporary directory and returns its absolute path.
Returns
string
withTmpDir()
withTmpDir():
object
Defined in: src/vitest/tmpdir.ts:22
Sets up beforeAll and afterAll hooks to create a tmp dir
the dir will be deleted at the end of test context (see https://vitest.dev/api/#afterall)
Returns
object
a reference to the dir. IT MUST ONLY BE ACCESSED INSIDE TESTS
path
Get Signature
get path():
string
Returns
string