Methods
-
compile(processed, options)
-
Compiles the templated test files with the given processed API spec data
Parameters:
Name Type Description processed
processing.ProcessedSpec the API spec data processed for test generation options
object for use in compilation of the tests Returns:
- Type
- Array.<compilation.GeneratedTest>
-
compileOperationLevel(processedOp, processedPath, processed, options)
-
Compiles the operation level 'describe' content
Parameters:
Name Type Description processedOp
processing.ProcessedOp the processed operation object to be compiled processedPath
processing.ProcessedPath the parent processed path object processed
processing.ProcessedSpec the entire processed API spec options
object for use in test compilation Returns:
-
compilePathLevel(processedPath, processed, options)
-
Compiles the path level 'describe' content
Parameters:
Name Type Description processedPath
processing.ProcessedPath the processed path object to be compiled processed
processing.ProcessedSpec the entire processed API spec options
object for use in test compilation Returns:
-
compileTransactionLevel(transaction, processedOp, processedPath, processed, options)
-
Compiles the operation level 'describe' content
Parameters:
Name Type Description transaction
processing.ProcessedTransaction the processed transaction object to be compiled processedOp
processing.ProcessedOp the parent processed operation object processedPath
processing.ProcessedPath the parent processed path object processed
processing.ProcessedSpec the entire processed API spec options
object for use in test compilation Returns:
-
prepareTemplate(templatePath)
-
prepares a handlebars template for the template given by the path
Parameters:
Name Type Description templatePath
string path to the template to load Returns:
- Type
- function
Type Definitions
-
GeneratedOp
-
GeneratedOp is the result of procressing an operation & compiling the operation-level test code
Type:
- object
Properties:
Name Type Description operationLevelDescription
string the operation level description to use incompilation operationLevelTests
Array.<compilation.GeneratedTransaction> Generated test file contents -
GeneratedPath
-
GeneratedPath is the result of procressing a path & compiling the path-level test code
Type:
- object
Properties:
Name Type Description test
string the generated test code portion -
GeneratedTest
-
GeneratedTest is the set of results from procressing a spec & compiling the test code
Type:
- object
Properties:
Name Type Description filename
string A file name based off of the path being tested contents
string Generated test file contents -
GeneratedTransaction
-
GeneratedTransaction is the compiled unit test code for a specific transaction
Type:
- string