compilation

compilation

Methods

compile(processed, options) → {Array.<compilation.GeneratedTest>}

Source:
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) → {compilation.GeneratedOp}

Source:
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:
Type
compilation.GeneratedOp

compilePathLevel(processedPath, processed, options) → {compilation.GeneratedPath}

Source:
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:
Type
compilation.GeneratedPath

compileTransactionLevel(transaction, processedOp, processedPath, processed, options) → {compilation.GeneratedTransaction}

Source:
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:
Type
compilation.GeneratedTransaction

prepareTemplate(templatePath) → {function}

Source:
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

Source:
Properties:
Name Type Description
operationLevelDescription string the operation level description to use incompilation
operationLevelTests Array.<compilation.GeneratedTransaction> Generated test file contents
GeneratedOp is the result of procressing an operation & compiling the operation-level test code
Type:
  • object

GeneratedPath

Source:
Properties:
Name Type Description
test string the generated test code portion
GeneratedPath is the result of procressing a path & compiling the path-level test code
Type:
  • object

GeneratedTest

Source:
Properties:
Name Type Description
filename string A file name based off of the path being tested
contents string Generated test file contents
GeneratedTest is the set of results from procressing a spec & compiling the test code
Type:
  • object

GeneratedTransaction

Source:
GeneratedTransaction is the compiled unit test code for a specific transaction
Type:
  • string