Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.47 KB

modules.md

File metadata and controls

45 lines (26 loc) · 1.47 KB

mocha-pod / Exports

mocha-pod

Table of contents

Namespaces

Functions

Functions

testfs

testfs(spec?, opts?): Disabled

Create a disabled testfs configuration from the given directory spec.

Calling the TestFs.Disabled.enable method will prepare the filesystem for testing operations.

IMPORTANT don't use this module in a real (non-containerized) system, specially with admin permissions, you risk leaving the system in an inconsistent state if a crash happens before a restore() can be performed.

Parameters

Name Type Description
spec? Directory Directory specification with files that need to be exist after set-up of the test fs. If the file exists previously in the given location it will be added to the keep list for restoring later. If it doesn't it will be added to the cleanup list to be removed during cleanup
opts? Partial<Opts> Additional options for the test fs.

Returns

Disabled

  • Disabled test fs configuration

Defined in

testfs/testfs.ts:294