core3-utils

@wixc3/testing-node on Github

Home > @wixc3/testing-node > createTestDir

createTestDir() function

Creates a test temporary directory The directory will be deleted after the test, thus not suitable for suites (“describe”)

Signature:

export declare function createTestDir(prefix?: string | undefined, disposalOptions?: string | Omit<DisposableOptions, 'dispose'>, disposeAfter?: typeof disposeAfterTest): string;

Parameters

Parameter Type Description
prefix string \| undefined _(Optional)_
disposalOptions string \| Omit<[DisposableOptions](/core3-utils/patterns.disposableoptions.html), 'dispose'> _(Optional)_
disposeAfter typeof disposeAfterTest _(Optional)_

Returns:

string

temp directory path