Provides the functionality to test TSProjectGenerator
-components
To get started with TSProjectGeneratorTest
, install the package using following command:
npm install --save @manuth/generator-ts-project-test
This package provides components for testing a few different types of file-mappings and DependencyCollection
s.
The DependencyCollectionTester
class provides methods for asserting the existence of dependencies.
Assert the existence and the versions of the dependencies in the DependencyCollection
.
Assert the existence of dependencies based on their names.
On top of the functionality of the DependencyCollectionTester
, the PackageFileMappingTester
also provides a method for checking package.json
-scripts.
Asserts the nature of the script with the specified name
.
The NPMIgnoreFileMappingTester
provides features for testing whether the expected files are ignored.
Gets the names of the absolute paths to the included files.
Asserts that the file located at the specified path
either is or is not ignored.
Asserts that the directory located at the specified path
, alongside its sub-directories and files, either is or is not ignored.
The TypeScriptFileMappingTester
provides the functionality for emitting and require
-ing the underlying output-file on-the-fly using the TypeScriptFileMappingTester.Require
-method.
ConvertibleFileMapping
s which parse and dump files, such as the TypeScriptFileMappingTester
, the YAMLFileMappingTester
or the JSONCFileMappingTester
provide methods for parsing and dumping content of their corresponding files.
Allows the user to get the parsed value of the specified text
.
Parses the text in the source-file.
Parses the text in the output-file.
Dumps the specified data
as text.
Dumps the text-representation of the specified data
to a file with the specified fileName
.
Dumps the specified data
to the source-file.
Dumps the specified data
to the output-file.