Namespace

test-utilities

test-utilities

Members

ValidatedMethod

# static constant exports.defineTestAdminUser

Defines a test admin user.

View Source test-utils/test-utilities.js, line 30

ValidatedMethod

# static constant exports.defineTestUser

Defines a test user.

View Source test-utils/test-utilities.js, line 58

# static constant exports.makeSampleChallenge

Creates a sample challenge for testing purposes.

View Source api/challenge/SampleChallenges.js, line 11

# static constant exports.makeSampleChallengeArray

Creates an array of challenge ids.

View Source api/challenge/SampleChallenges.js, line 26

# static constant exports.makeSampleChallengeSlugArray

Creates an array of challenge slugs.

View Source api/challenge/SampleChallenges.js, line 40

# static constant exports.makeSampleDeveloper

Creates a sample developer.

View Source api/user/SampleDevelopers.js, line 14

Methods

# static exports.makeSampleInterest() → {String}

Creates an Interest with a unique slug and returns its docID. Also creates a new InterestType.

View Source api/interest/SampleInterests.js, line 13

The docID for the newly generated Interest.

String

# static exports.makeSampleInterestArray(numInterests) → {Array.<string>}

Returns an array of interestIDs.

Parameters:
Name Type Description
numInterests number

the number of interestIDs. Defaults to 1.

View Source api/interest/SampleInterests.js, line 26

Array.<string>

# static exports.makeSampleInterestSlugArray(numInterests) → {Array.<string>}

Returns an array of defined Interest slugs.

Parameters:
Name Type Description
numInterests

the number of Interests to define. Defaults to 1.

View Source api/interest/SampleInterests.js, line 39

An array of defined Interest Slugs.

Array.<string>

# static exports.makeSampleSkill() → {String}

Creates an Skill with a unique slug and returns its docID. Also creates a new SkillType.

View Source api/skill/SampleSkills.js, line 13

The docID for the newly generated Skill.

String

# static exports.makeSampleSkillArray(numSkills) → {Array.<string>}

Returns an array of SkillIDs.

Parameters:
Name Type Description
numSkills number

the number of SkillIDs. Defaults to 1.

View Source api/skill/SampleSkills.js, line 26

Array.<string>

# static exports.makeSampleSkillSlugArray(numSkills) → {Array.<string>}

Returns an array of defined Skill slugs.

Parameters:
Name Type Description
numSkills

the number of Skills to define. Defaults to 1.

View Source api/skill/SampleSkills.js, line 39

An array of defined Skill Slugs.

Array.<string>

# static exports.makeSampleTool() → {String}

Creates an Tool with a unique slug and returns its docID. Also creates a new ToolType.

View Source api/tool/SampleTools.js, line 13

The docID for the newly generated Tool.

String

# static exports.makeSampleToolArray(numTools) → {Array.<string>}

Returns an array of ToolIDs.

Parameters:
Name Type Description
numTools number

the number of ToolIDs. Defaults to 1.

View Source api/tool/SampleTools.js, line 26

Array.<string>

# static exports.makeSampleToolSlugArray(numTools) → {Array.<string>}

Returns an array of defined Tool slugs.

Parameters:
Name Type Description
numTools

the number of Tools to define. Defaults to 1.

View Source api/tool/SampleTools.js, line 39

An array of defined Tool Slugs.

Array.<string>

# 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 test-utils/test-utilities.js, line 84