api/test

api/test

Members

(static, constant) exports.defineTestFixturesMethod

Source:

A validated method that loads the passed list of fixture files in the order passed.

Methods

(static) exports.defineTestFixture(fixtureName)

Source:

Loads data from a modular test fixture file.

Parameters:
Name Type Description
fixtureName

The name of the test fixture data file. (located in private/database/modular).

(static) exports.defineTestFixtures(fixtureNames)

Source:

Loads all the data from an array of fixture file names.

Parameters:
Name Type Description
fixtureNames

an array of the name of the test fixture data file. (located in private/database/modular).

(static) exports.loadCollection(collection, loadJSON, consolep)

Source:

Given a collection and the loadJSON structure, looks up the definitions and invokes define() on them.

Parameters:
Name Type Description
collection

The collection to be loadd.

loadJSON

The structure containing all of the definitions.

consolep

output console.log message if truey.

(static) exports.withLoggedInUser()

Source:

Returns a Promise that resolves if one can successfully login with the passed credentials.
Credentials default to the standard admin username and password.

(static) exports.withRadGradSubscriptions()

Source:
See:

Returns a Promise that resolves when all RadGrad collections subscriptions are ready.

(static) getDefinitions(loadJSON, collection)

Source:

Returns the definition array associated with collectionName in the loadJSON structure,
or an empty array if none was found.

Parameters:
Name Type Description
loadJSON

The load file contents.

collection

The collection of interest.