Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99612

Generalize assert methods in JavaScript tests

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      We have too many different assert methods in our JavaScript end-to-end tests. The number can be reduce by generalizing some of the methods.

      For instance, assert.dropExceptionsWithCode(func, dropCodes, onDrop) can be expressed through a generalized assert.doesNotThrow(func, params, ignoreErrorCodes, msg).

      Another example: assert.commandWorkedOrFailedWithCode(res, errorCodeSet, msg) can be expressed through a generalized assert.commandWorked(res, msg, ignoreErrorCodes).

            Assignee:
            Unassigned Unassigned
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: