Create a new file in the temp directory.
Path relative to temp directory (e.g., '/module.ts' or 'src/app/module.ts')
File content
SourceFile instance from ts-morph
Get all created files.
Set of absolute file paths
Get statistics about the test helper (for debugging/validation).
Statistics object
Number of files created through this helper.
Number of source files in the ts-morph project.
Path of the temporary directory.
StaticcreateFactory method to create and initialize a new RealFsTestHelper.
Initialized test helper instance
Test helper that creates a temporary real directory and a ts-morph project on it, as an alternative to the in-memory file system when a test must reflect real file system behavior (for example schematics tests). RealFsTestHelper.cleanup removes the directory.
Example