Provides a set of test values for use in unit tests.

Hierarchy

  • TestValues

Constructors

Properties

categories: CategoryNames[] = ...

An Array containing all existing CategoryNames.

categoriesLength: number = ...

The number of existing CategoryNames.

invalidAliases: string[][] = []
invalidFieldsJSONobjects: JSONObject[] = []

Examples of invalid Fields as JSONObjects, created from the JSON files in invalidMocksPath as well as from #invalidIDs and #invalidUIDs.

invalidIDs: string[] = ...

Hand-picked examples of invalid Fields#ids.

invalidMistakesJSONobjects: JSONObject[] = []

Examples of invalid Mistakes as JSONObjects, created from #invalidFieldsJSONobjects.

invalidNamePrefixes: string[] = ...

Hand-picked invalid prefixes for Fields#names.

invalidNames: string[] = []

An Array containing dynamically generated invalid Fields#names.

invalidNumbers: number[] = ...

Hand-picked examples of invalid GrammleID#numbers.

invalidOrderIDs: string[] = ...

Hand-picked examples of invalid Fields#orderIDs.

invalidRegExes: string[] = ...

Hand-picked examples of invalid RegExps.

invalidUIDs: string[] = ...

Hand-picked examples of invalid Fields#uids.

productionMistakes: Mistake[] = []

Contains all the Mistakes from the mistakesFile.

randomCategories: CategoryNames[] = ...

An Array containing the CategoryNames of #randomIDs in the same order.

randomGrammleIDs: GrammleID[] = []

An Array containing the #randomIDs as #GrammleIDs in the same order.

randomIDnumbers: number[] = ...

An Array containing the ID numbers of #randomIDs in the same order.

randomIDs: string[] = ...

An Array containing valid Fields#ids. Consists of:

  • #validIDs (cloned)
  • randomly generated Fields#ids
randomOrderIDs: string[] = ...

An Array containing valid Fields#orderIDs. Consists of:

validAliases: string[][] = []

TODO: finish documentation An Array of

validAliasesWithIDandUID: string[][] = []
validAliasesWithoutIDandUID: string[][] = []
validFields: Fields[] = []

An Array of valid Fields created from:

  • the Mistakes in the mistakesFile
  • the hand-picked JSON files in validMocksPath
validFieldsObjects: FieldsObject[] = []

An Array of valid FieldsObjects created from:+

  • the MistakeObjects in the mistakesFile
  • the hand-picked JSON files in validMocksPath
validIDs: string[] = ...

Hand-picked examples of valid Fields#ids.

validMistakeObjects: MistakeObject[] = []

An Array of valid MistakeObjects created from the mistakesFile.

validMistakes: Mistake[] = []

An Array of valid Mistakes created from the mistakesFile.

validMockFields: Fields[] = []

An Array of valid Fields created from the JSON files in validMocksPath.

validMockFieldsObjects: FieldsObject[] = []

An Array of valid FieldsObjects created from the objects from the hand-picked JSON files in validMocksPath.

validNames: string[] = []

Hand-picked examples of valid Mistake#names.

validNumbers: number[] = ...

Hand-picked examples of valid GrammleID#numbers.

validOrderIDs: string[] = ...

Hand-picked examples of valid Fields#orderIDs.

validRegExes: string[] = []

Hand-picked examples of valid RegExps.

validUIDs: string[] = ...

Hand-picked examples of valid Fields#uids.

Methods

  • Converts an instance of FieldsObject to Fields. Does NOT check if the fields are valid.

    Returns

    the converted fields object

    Parameters

    Returns Fields

  • Generates GrammleIDs from all randomIDs and adds them to randomGrammleIDs.

    Returns

    true

    Returns true

  • Private

    Generates aliases that don't meet the requirements of Fields#setAliases, i.e.

    • aliases.length === 0
    • aliases[0] is a valid ID, but aliases[1] is not a valid UID
    • aliases[1] is a valid UID, but aliases[0] is not a valid ID

    Returns void

  • Loads all invalid JSONObjects from the mock/fields/invalid directory and adds them to #invalidFieldsJSONobjects.

    Returns

    true

    Returns true

  • Loads all valid FieldsObjects from the mock/fields/valid directory and adds them to #validFieldsObjects.

    Returns

    true

    Returns true

Generated using TypeDoc