API Docs for: 0.1.0

Class gabarito.plumbing.ServerEnvironment

Extends: gabarito.plumbing.Environment
Class defined in: lib/plumbing/ServerEnvironment.js:33

The server environment provides a simple http server to serve the test files and run the tests themselves within a browser.

An implementation must implement a way of dispatching a browser to navigate to "http://localhost:1432" and it may implement a method to close the browser when the gabarito has finished.

gabarito.plumbing.ServerEnvironment( [http], [fs] )
lib/plumbing/ServerEnvironment.js:33
Parameters:
  • [http] <HTTP>

    The node http library

  • [fs] <FileSystem>

    The node file system library

Index

Methods

dispatch( files, reporters, done )
Defined in gabarito.plumbing.Environment: lib/plumbing/Environment.js:35

Method called by the runner that receives the files to be loaded, the reporters that should receive all events and the callback function that must be called passing all the results at the end of things.

Parameters:
dispatchBrowser( done ) /* protected method */
lib/plumbing/ServerEnvironment.js:250

This method must be implemented in order to dispatch the browser to navigate to "http://localhost:1432".

The done function must be called afterwards.

Parameters:
  • done <Function>
ditchBrowser( done ) /* protected method */
lib/plumbing/ServerEnvironment.js:64

This method may be implemented in order to clean up any browser reference.

It must call the done function afterwards.

Parameters:
  • done <Function>
String getName( )
Defined in gabarito.plumbing.Environment: lib/plumbing/Environment.js:23

The environment's name


Returns: <String>