Reporter Class
The HTML reporter can produce a set of HTML files with the results of your testrun.
The reporter can be installed with the following command:
$ npm install dalek-reporter-html --save-dev
By default the files will be written to the report/dalek/
folder,
you can change this by adding a config option to the your Dalekfile
"html-reporter": {
"dest": "your/folder"
}
If you would like to use the reporter (in addition to the std. console reporter), you can start dalek with a special command line argument
$ dalek your_test.js -r console,html
or you can add it to your Dalekfile
"reporter": ["console", "html"]
Constructor
Reporter
()
Item Index
Methods
_recursiveMakeDirSync
-
path
Helper method to generate deeper nested directory structures
Parameters:
-
path
StringPAth to create
addActionToDetailPage
-
data
Adds an action output to the detail page
Parameters:
-
data
ObjectEvent data
addAssertionToDetailPage
-
data
Adds an assertion result to the detail page
Parameters:
-
data
ObjectEvent data
finishDetailPage
-
data
Writes a detail page to the file system
Parameters:
-
data
ObjectEvent data
initOutputHandlers
()
chainable
Inits the html buffer objects
loadTemplates
()
chainable
Loads and prepares all the templates for CSS, JS & HTML
outputAssertionResult
-
data
Pushes an assertion result to the index output queue
Parameters:
-
data
ObjectEvent data
outputRunBrowser
-
browser
Stores the current browser name
Parameters:
-
browser
StringBrowser name
outputRunnerFinished
-
data
Writes the index page to the filesystem
Parameters:
-
data
ObjectEvent data
outputTestFinished
-
data
Pushes an test result to the index output queue
Parameters:
-
data
ObjectEvent data
startDetailPage
()
chainable
Prepares the output for a test detail page
startListening
()
chainable
Connects to all the event listeners