IntegrationSuite Factory

Defined in: lib/TestUtils.js

Public Functions

voidconfigure(Object)
voidset(String, Any)
voidrun(Object, Function)
StringcreateFile(String, String|Function)
voidassertFileWasRendered(String, String, Object)

Instance Constructor Documentation

IntegrationSuite(mochaSuite: mocha, suiteOptions: Object)

Parameters (3)

mochaSuite
mocha
suiteOptions
Object
suiteOptions.timeout
Number

Defaults to: 2000

Instance Method Documentation

    assertFileWasRendered(fileName: String, fileName: String, assertions: Object)

    Assert that a file was emitted and contained something that is not 404.

    Parameters (5)

    fileName
    String

    The file path (relative to outputDir) that you're expecting.

    fileName
    String

    The same path you used to create the file with TestUtils.IntegrationSuite#createFile.

    assertions
    Object
    assertions.text
    String
    assertions.html
    String

    configure(overrides: Object)

    Override compiler config.

    Parameters (1)

    overrides
    Object

    createFile(fileName: String, contentsFn: String|Function) -> Object

    Create a temporary file.

    Parameters (2)

    fileName
    String

    Relative file path.

    contentsFn
    String|Function

    The contents of the file. If it's a function, we'll multiline-slash it.

    Return Values

    file
    Object
    file.path
    String
    file.contents
    String

    run(runOptions: Object, done: Function)

    Perform a compilation.

    Parameters (4)

    runOptions
    Object

    Options to pass to Compiler#run.

    Defaults to: {}

    done
    Function
    done.error
    Error
    done.stats
    Object

    set(key: String, value: Any)

    Override a single compiler config item.

    Parameters (2)

    key
    String

    This can be a deep path.

    value
    Any