/** * TestSandbox class provides a convenient way to get a reference to a * sandbox folder in which you can perform operations for testing purposes. */ export declare class TestSandbox { private _path?; readonly path: string; /** * Will create a directory if it doesn't already exist. If it exists, you * still get an instance of the TestSandbox. * * @param path - Path of the TestSandbox. If relative (it will be resolved relative to cwd()). */ constructor(path: string); /** * Returns the path of the TestSandbox */ getPath(): string; /** * Resets the TestSandbox. (Remove all files in it). */ reset(): Promise; /** * Deletes the TestSandbox. */ delete(): Promise; /** * Makes a directory in the TestSandbox * * @param dir - Name of directory to create (relative to TestSandbox path) */ mkdir(dir: string): Promise; /** * Copies a file from src to the TestSandbox. If copying a `.js` file which * has an accompanying `.js.map` file in the src file location, the dest file * will have its sourceMappingURL updated to point to the original file as * an absolute path so you don't need to copy the map file. * * @param src - Absolute path of file to be copied to the TestSandbox * @param dest - Optional. Destination filename of the copy operation * (relative to TestSandbox). Original filename used if not specified. */ copyFile(src: string, dest?: string): Promise; /** * Creates a new file and writes the given data serialized as JSON. * * @param dest - Destination filename, optionally including a relative path. * @param data - The data to write. */ writeJsonFile(dest: string, data: unknown): Promise; }