Namespace

api/test

api/test

Members

# static constant exports.defineTestFixturesMethod

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

View Source api/test/test-utilities.ts, line 73

Methods

# static exports.defineTestFixture(fixtureName)

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).

View Source api/test/test-utilities.ts, line 42

# static exports.defineTestFixtures(fixtureNames)

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).

View Source api/test/test-utilities.ts, line 55

# static exports.getDefinitions(loadJSON, collection)

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.

View Source api/test/test-utilities.ts, line 16

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

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.

View Source api/test/test-utilities.ts, line 27

# static exports.withLoggedInUser()

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

View Source api/test/test-utilities.ts, line 104

# static exports.withRadGradSubscriptions()

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

See:

View Source api/test/test-utilities.ts, line 87