mocha-pod / Exports / TestFs / Disabled
TestFs.Disabled
▸ enable(): Promise<Enabled>
Setup the test environment with the provided test configurations
The following operations are performed during this step.
- Group the directory spec into existing/non-existing files. Existing files go into the keep list for backup and non-existing will go to the cleanup list.
- Create a backup of all files matching the keep list
- Replace all files from the directory spec into the filesystem.
Note that attempts to call the setup function more than once will cause an exception.
Promise<Enabled>
▸ restore(): Promise<Disabled>
If the instance has been enabled, restore the environment to the state before the filesystem was setup
Nothing is done if the instance has not yet been enabled or it has alread been restored.
Promise<Disabled>