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

Remove assert.commandFailed() and assert.throws()

    • Server Programmability

      As max.hirschhorn@mongodb.com said well, "assert.commandFailedWithCode() should always be preferred over assert.commandFailed() because it is possible to write the input parameters to a command incorrectly where it fails with BadValue/TypeMismatch/FailedToParse/etc. and means the test isn't exercising what it intended".

      assert.throws has the same problem and assert.throwsWithCode should be used instead.

            Assignee:
            Unassigned Unassigned
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: